比较GIT裸回购和bitbucket回购

比较GIT裸回购和bitbucket回购

问题描述:

我怎样才能确保我的裸回购和我的bitbucket回购是相同的?

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?


  • 创建本地存储库
  • 为您的裸存储库添加一个远程计算机
  • 为您的bitbucket存储库添加一个远程计算机
  • 从两个存储库获取

  • 验证相应的分支指向相同的提交

    • 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
    • 我可能会这样做:

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

    我期望 bare / master 指向与 bitb / master 等相同的提交。

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