Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8484931
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:30:18+00:00 2026-06-10T20:30:18+00:00

This should be a breeze for some experienced git users, I hope. I’d like

  • 0

This should be a breeze for some experienced git users, I hope.
I’d like to use a single command, that when issued, would make git synchronize with the current state of my project directory. In contrast to having to issue separate commands for adding files added to my project, deleting files removed from it, etc. Rationale being that I do not need that additional layer of acknowledging each change to my project just for the sake of git, I’d rather have git just reflect the directory (when I find that it is a good sync point worth syncing into git).

That is also the approach taken in Github for Windows. It just syncs git with your project (it does provide options for excluding changes, but only as an option).

Really, I normally find no need to tell git ‘update with this changed file’, ‘remove this file from your record as I’ve deleted it’ etc.

I’d really rather not experiment over time with it, and would hope this question has a simple designed-to-work answer.

Thanks in advance,
Matan

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T20:30:19+00:00Added an answer on June 10, 2026 at 8:30 pm

    Nice and simple as a single add command:

    git add -A
    

    Note that git add . is not sufficient, as . expands to “the current directory”, a.k.a. “all current files”, which means it won’t tell git about any files that no longer exist (i.e. deleted files)

    Alternatively, if you want to add and commit in a single step (which generally isn’t recommended) then you can

    git commit -a
    

    instead.

    It’s worth knowing that there’s no need to “experiment over time” with these git commands, as git help has a lot of documentation about each of the git commands and their options.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This should be pretty simple but for some reason I can't get this value
This page I have is super simple, this should be a breeze but I'm
this should be a simple question, but the answer has eluded me for some
This should hopefully be a simple one. I would like to add an extension
This should a quick question for some easy rep. I'm doing some PHP Website
This should be a quick one. Is it possible to do something like this:
This should be really simple but for some reason I'm stumped on this... I'm
This should be simple enough. Here's my one line of code that's giving me
This should be a really really simple thing, but for some reason it is
This should be a simple one: I have an observableArray object called To in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.