execute git command inside bash script

一笑奈何 提交于 2019-12-01 06:00:18
VonC

As mentioned here or there, you could precede all your git commands with:

 env -i

in order to make sure there is no side effect with, for instance, a GIT_DIR environment variable which could have been previously set.
(env -i or simply: unset GIT_DIR)

Is /var/vh/holding a git repository? i.e. have you run git init on it, set up your remotes, set it to track your holding.git directory, etc.? Also, if you're not pulling from the same repo you're pushing to, you shouldn't need the reset and checkout.

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