Can not see changes using git push

≯℡__Kan透↙ 提交于 2019-12-21 23:48:06

问题


I want to set up a git environment for my PHP website. In my centos server, I created a directory and using git init --bare --shared to initial the git repository. Then I run git add . and git commit.

In my laptop, i use net beans IDE to get a clone of the git repository through SSH. I added some files and commit, push. It seems no problems.

My question is why I can not see any changes happened in my centos server. In the original repository, there are nothing changed. Do I need to run some commands?

Thanks in advance!


回答1:


It is a bare repo, which means it has no working tree, no visible files.

See "all about "bare" repos".

You would need to add a post-receive hook to your bare repo in order to update a live site (like this one).

GIT_WORK_TREE=/path/to/your/site git checkout -f

See the full script in "unable to set GIT_WORK_TREE variable in a bare repository when using post_update hook".



来源:https://stackoverflow.com/questions/19435222/can-not-see-changes-using-git-push

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!