2

I wanted to add an Xcode project to an existing repository using the following:

 cd Test
 git add .
 git commit -m 'Adding initial files.'
 git push -u origin master

But in the repository I get a green arrow on the folder I just added, and I'm not sure why that is happening.

This is what I'm getting like on the folder

EDIT: Why does this kind of symbol occur usually? any idea??

EDIT 2: git status says unable to create c:/.../.../.../index.lock : File exists

Tamara Wijsman
  • 12,198
  • 8
  • 53
  • 82
Sharanya K M
  • 1,805
  • 4
  • 23
  • 44

3 Answers3

3

Do you have any files, or just the folder? Git will not add an empty folder.

Synesso
  • 37,610
  • 35
  • 136
  • 207
  • @Sharanya, are you certain the files have been added to your local repository? What is the output of `git ls-tree -r HEAD .`? – mpontillo Mar 05 '12 at 06:45
1

git status should tell you whether there are uncommitted commits left.

Please note that git add . does not add deletes to the commit. Use git add -A instead...

Community
  • 1
  • 1
Tamara Wijsman
  • 12,198
  • 8
  • 53
  • 82
  • I tried this. it says "unable to create c:/.../.../.../index.lock : File exists If no other git process is currently running, this probably means that a git process crashed in this repository earlier. Make sure no other git processes are running and remove the files manually to continue. " – Sharanya K M Mar 05 '12 at 06:44
0

Thanks guys. Although I still dont know what was the problem. I did it all a fresh. Created another repo and added these files again. It worked..!!

Thanks for the help

Sharanya K M
  • 1,805
  • 4
  • 23
  • 44