Git add not adding files

user200081 picture user200081 · Nov 12, 2012 · Viewed 22.8k times · Source

when I try to git add my files, I typed

git add <insert file names here>

That works correctly. However, when I try to do

git commit -a

My git repository tells me that it's empty. What is outputted is:

# On branch master
# Untracked files:
#   (use "git add <file>..." to include in what will be committed) 
#
<insert name of files here>

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

Might anyone know the solution to this? Thanks.

Answer

Kyle Carlson picture Kyle Carlson · Jul 23, 2013

And you may also want to make sure you're in the root of your project. I had that problem for a while on a Rails project a while back & then realized I was in the /config directory. Whoops! #noobmistake