0

I am following this Acquia tutorial "Using Acquia Cloud with a remote repository" to merge 2 origins together. Here I am using Acquia & Bitbucket.

So, my both remote origins look like,

  • origin - [sitename]@svn-[number].prod.hosting.acquia.com:[sitename].git
  • bitbucket - git@bitbucket.org:[username]/[repo].git

When I work on the codebase I do the following to push codes. This is valid only for my work terminal.

  • git add .
  • git commit -m "message"
  • git push origin develop && git push bitbucket develop

Now, the problem is that I have other developers too. So they only have access to bitbucket. So they will push the codes to bitbucket repository and it is me who has to get those updates in my local machine and push to acquia too for deployment.

So the question is how can I get update from bitbucket repository and push to acquia repository so both are in sync.

Please suggest.

4

2 回答 2

2

你可以用一个简单的方法来保持同步

git pull bitbucket
git push origin

这会从一个远程存储库中提取最新更改并将它们应用到另一个。

于 2015-06-19T16:57:51.587 回答
0

如果您总是同时将文件添加到 bitbucket 和 origin,而没有其他人推送到 origin,则不需要合并。只需养成在每次从 bitbucket 获取/拉取后推送到原点的习惯,两者应该保持同步。

于 2015-06-19T13:03:51.973 回答