Checkout source files from local git repo to local folder

孤者浪人 提交于 2019-12-08 04:13:20
VonC
cd ~/project.git
GIT_WORK_TREE=/home/ubuntu/project git checkout -f

This is the right way to checkout files from a bare repo.

But if the variable isn't see as exported by the git checkout command, you can wrap that in a script, like "unable to set GIT_WORK_TREE variable in a bare repository when using post_update hook" did.
That is what makes the a post-receive work, in the directory ~/project.git/hooks/.

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