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!
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 trial
Problem to commit with git (nothing added to commit)
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
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 ...
Ok, 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 ...
Chris Dziewa17,781 Points
It 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.
Easy 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