开发者

tortoisegit push successfully, but no new files?

开发者 https://www.devze.com 2022-12-11 08:44 出处:网络
I have setup a git repository in a linux server, and installed the latest MSysGit and TortoiseGit on my Windows 7 laptop.

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 rem开发者_StackOverflow社区ote 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.


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消