So I’ve taken over a website, some of which has been under git version control (one of the devs used it, the other didn’t). So I’m going to commit everything so far, and work from there.
However, there are a few files with a git status which I don’t quite understand. They are labelled as:
# Changed but not updated:
# (use "git add/rm <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
So if I simply run git commit, will the changes made to these files work their way in to the repository? It’s just I don’t get why you would do add/rm- seems like adding and then removing all in one foul swoop.
Thanks for your help!
These files are staged but not committed. Yes, if you simply run git commit, they will be committed. More to the point, do you want to commit these files? They may or may not be the same as your working files. http://gitready.com/beginner/2009/01/18/the-staging-area.html is a decent introduction to the staging area.