We help IT Professionals succeed at work.

git add readme2 . . . not functioning

Mike Eghtebas
Mike Eghtebas asked
on
Following the instructions at:
http://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository

After:
PS C:\users\mike\gitcode\gitfundamentals> echo 'My Project' >Readme2
PS C:\users\mike\gitcode\gitfundamentals> git add readme2

lines, I am checking the status as shown below, I am getting:
PS C:\users\mike\gitcode\gitfundamentals> git status
On branch master

Initial commit

Untracked files:
  (use "git add <file>..." to include in what will be committed)

	Readme.txt
	Readme2

nothing added to commit but untracked files present (use "git add" to track)

Open in new window


Instead, I was expecting something like:
PS C:\users\mike\gitcode\gitfundamentals> git status
On branch master
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

    new file:   README

Open in new window


Question: Why my code "PS C:\users\mike\gitcode\gitfundamentals> git add readme2" is not working?

The reason I am saying it is not working is because the > git status command after that seemingly is not confirming the add process.
Comment
Watch Question

Mike EghtebasDatabase and Application Developer

Author

Commented:
PS C:\users\mike\gitcode\gitfundamentals> git add -A

worked okay. I didn't want to delete this post in case someone may want additional information to this post.

Mike
IT Business Systems Analyst / Software Developer
Top Expert 2015
Commented:
It could be a case-sensitivity issue. From your "echo" command and from the git status, you have a Readme2 file but your "git add" line is trying to add readme2. Try "git add Readme2" and see how you go.
Mike EghtebasDatabase and Application Developer

Author

Commented:
Very good point. This must have been the reason. Thanks.

Could you also take a look at this new question: http://www.experts-exchange.com/Programming/Languages/Scripting/Powershell/Q_28625067.html