I have setup a git repository in a linux server, and installed the latest MSysGit and TortoiseGit on my Windows 7 laptop. I can pull from the remote repository by TortoiseGit, and I can commit & push to remote repository too. If I run "git log" in the remote server, it can show the latest comments correctly. But the new files are missing in the remote server. Please advise and suggest. Thank you so much.
The index has been updated, but not the workspace. To update the workspace, use git reset
. If you have uncommitted modifications, make sure to commit them, git stash
them, or use git reset --hard
if you don't mind losing them.
edit: Probably a moot point by now, but it looks like git reset
by itself isn't enough - use git reset --hard
.
It is highly recommended that you never push to a non-bare repository. Instead, you should create a bare repository that is a clone of your remote repository. The laptop will push to the bare repository, then the remote repository will pull from the bare one.
If you push to the non-bare repository, you will sooner or later accidentally lose work.
I have the exact same problem as the original poster, push seems to work (I can see it in the logs) but the files aren't uploaded.
I don't understand both of the 2 answers. I've been using SVN for years, and I understand that the difference is that now I need to click on "Push" after doing a commit in order to send the files, but that doesn't seem to work (no error message).
I've been trying the whole weekend to understand and to solve the problem with no success.
I would greatly appreciate your help with simple words and clear steps (like click on the "xxxx" button then blabla... etc.).
Thank you!