Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMathieu Martinot Dubary
4,978 PointsProblem to commit with git (nothing added to commit)
Hello,
I'm following the course about git and I have an issue. I'm running with windows 8. I have setup git, but when I try to commit my readme file, it doesn't work.
I have the error
'''Untracked files:
README
nothing added to commit but untracked files present (use "git add" to track)'''
Which is very weird is that I have put "git add readme.txt" before ... Do you know what can be wrong ?
I have the feeling that if I was with a Mac it would be so much easier for these things ...
Thanks
3 Answers
Mathieu Martinot Dubary
4,978 PointsOk, I have found the issue few seconds after my post ...
Actually the command git add [file] is case sensitive. My file name is README.TXT so I have to write git add README.TXT instead of git add readme.txt ...
Sorry !
Chris Dziewa
17,781 PointsIt is because you haven't staged
your files to be committed. You need to add the files that you want to be committed. Once you have, then you should be able to commit like normal. Do git status
to view the changes needing to be modified. If you want to add everything in the current directory you can type git add .
. The period selects the current folder but can also be replaced with a file name. Now run git status again to see that all of your changes have been added and are ready to be committed. Now you can commit with a message.
beatagozdziaszek
9,945 PointsEasy to say. I have untracked files and don't know how to add them to my GIT repository. I have wasted so much time and cannot fin answer . What command should I use? btw I use command line on Ubuntu and I am new to this.
Your branch is up-to-date with 'origin/master'. Untracked files: (use "git add <file>..." to include in what will be committed)
css/
images/
index.html
James Barnett
39,199 PointsJames Barnett
39,199 PointsIn most OSes filenames are case-sensitive.