Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Git Add have a verbose switch

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)

like image 478
deanvmc Avatar asked Oct 10 '22 04:10

deanvmc


People also ask

What does git add actually do?

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 .

What is -- verbose in git?

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.

What comes after git add?

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 .

What comes first staging with git add?

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.


1 Answers

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 
like image 187
Sahil Muthoo Avatar answered Oct 26 '22 02:10

Sahil Muthoo