Compare a GIT bare repo and bitbucket repo

孤人 提交于 2019-12-12 06:59:45

问题


How can I make sure that my bare repo and my bitbucket repo are identical?

First thing I did was to look at the logs, but that may be not enough right?


回答1:


  • create a local repository
  • add a remote for your bare repository
  • add a remote for your bitbucket repository
  • fetch from both repositories.
  • verify that the corresponding branches point to the same commits

I would probably do it like this:

git init
git remote add bare $bareuri
git remote add bitb $bitbucketuri
git fetch --all
gitk --all

I would expect bare/master point to the same commit as bitb/master, etc.



来源:https://stackoverflow.com/questions/23391426/compare-a-git-bare-repo-and-bitbucket-repo

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