I\'m having issues where I can\'t add files to my repository.
I\'m using GIT on windows, in Aptana Studio for some Ruby development.
I\'ve managed to push a
Best bet is to copy your folder. Delete the original. Clone the project from github, copy your new files into the new cloned folder, and then try again.
I searched around for a while and ended up finding out I had blocked off the SSH port which was what caused the git add command to stop working. I ended up changing origin using https with the following command: git remote set-url origin [url-to-git-repo]
I had a similar issue.
The problem was, on Windows, in the index, the file was added in a case different from what was in the unstaged area. For example, in the index, the file was name xx.txt
and in the unstaged area, the file was names Xx.txt
.
Removed the file with the incorrect case from the index (xx.txt
). Then, I have been able to add the file with the correct case (Xx.txt
).
To add to the possible solutions for other users:
Make sure you have not changed the case of the folder name in Windows:
I had a similar problem where a folder called Setup
controlled by Git and hosted on GitHub, all development was done on a Windows machine.
At some point I changed the folder to setup
(lower case S). From that point on when I added new files to the setup folder they were stored in the setup
folder and not the Setup
folder, but I guess because I was developing on a Windows machine the existing Setup
folder in git/github was not changed to setup
.
The result was that I couldn't see all of the files in the setup
in GitHub. I suspect that if I cloned the project on a *nix machine I would have seen two folders, Setup
and setup
.
So make sure you have not changed the case of the containing folder on a Windows machine, if you have then I'd suggest:
setup-temp
git add -A
git commit -m "Whatever"
git add -A
git commit -m "Whatever"
I had this problem with the first program in the folder. I did "git add" then "git commit". "git status" gave the error described i.e. "nothing to commit, working directory clean"
I ended up deleting the .git file from the program folder. Then I did a new git init, git add and git commit and it worked.
Another issue can be file permissions.
Try issuing :
chmod 755 file1