3

We have one internal remote repository in stash and one repository in github for our third party consultants. We try to synch the repository in "Atlassian Stash" to the repository in GitHub everyday. The procedure I follow is to change the remote to github using set url and pull from github (the branch I desire) to my local directory and then I change the remote again to "stash" and push the changes there from my local directory. Is this a good approach or there is a better way to do it?

4

2 回答 2

1

您可以为此使用钩子

当第一个 repo 触发post-receive时,您可以推送到第二个 repo

于 2013-06-03T18:24:06.113 回答
1

正如@g19fanatic 所说,无需不断更改远程 URL。只是

git pull <name of stash remote>
git push <name of github remote>

为此,您需要两个单独的遥控器;如果需要,添加第二个git remote add

于 2013-06-03T17:31:24.883 回答