I am in the process of moving all my private an public repo's over to github. One of the decisions I have made is to only use the console as it means a smaller tooling footprint if I ever need to change PCs, etc.
I would be a huge user of console applications and being new to git I decided to purchase Tekpub's Mastering Git series since it shows you how to intergrate git bash as a toolbar.
Everything is working fine except for the add all command which is:
git add .
It seems to be working but I don't get any indication of it working or not. Is there a verbose switch (I think that is what it would be called) that would say what files were tracked after the command is launched?
I am using Visual Studio 2010 with the standard install of git (Not Git extensions)
git add. The git add command adds a change in the working directory to the staging area. It tells Git that you want to include updates to a particular file in the next commit. However, git add doesn't really affect the repository in any significant way—changes are not actually recorded until you run git commit .
Today I want to talk about a little-know flag for the git commit command that I think will help you create better commits: -v , also known as --verbose . Use this flag and Git will include the diff of the changes at the bottom of the commit message template: I think this is helpful for a couple of reasons.
git add . adds all modified and new (untracked) files in the current directory and all subdirectories to the staging area (a.k.a. the index), thus preparing them to be included in the next git commit .
Staging. Before we make a commit, we must tell Git what files we want to commit (new untracked files, modified files, or deleted files). This is called staging and uses the add command.
For some git-commands you can specify --verbose
,
git 'command' --verbose
or
git 'command' -v
Make sure the switch is after the actual git command. Otherwise - it won't work!
Also useful:
git 'command' --dry-run
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With