git - 如何解释 Bitbucket Commit Graph 的可视化?

标签 git bitbucket

我目前正在使用 Bitbucket 的 提交图可视化来了解我的提交历史,这非常令人困惑,因为最左边的分支不对应于 develop(我拥有的分支在某些情况下在下 pull 列表中选择)。

commit history of my code

相比之下,我检查了命令git log --graph --oneline --all(在git checkout develop之后),它给出的输出是什么我很期待。最左边的分支表示 develop,我更容易理解所有 merges 到我想考虑的分支,即 develop这种情况。

我应该如何解释 Bitbucket 提交图的可视化?我认为它不等同于命令 git log --graph --oneline --all?它相当于什么?

最佳答案

我将与您分享一个命令,该命令对我在命令行界面中绘制类似的 bitbucket 图很有用。

git log --graph --decorate --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --all

您还可以添加一个 git 别名,在 ~/.gitconfig 上添加以下配置

[alias]
    lol = log --graph --decorate --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --all

通过这种方式运行 git lol 命令,您也可以快速看到类似的图表。

希望对您有所帮助!

关于git - 如何解释 Bitbucket Commit Graph 的可视化?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65490045/

相关文章:

ios - 为什么我的 launchScreen.storyboard 旁边还有一个 D?

visual-studio - 在 Visual Studio 中跟踪更改

linux - 无法在现有 checkout 的 git 存储库中克隆 git repo

git - BitBucket 使用 Cron Job 自动 pull

ssh - 在 Sourcetree Windows 中为 Mercurial 存储库启用 SSH 压缩

git - git diff 如何判断一行是否已被修改或添加?

git - 添加/删除 git 子模块的麻烦

git - 删除带有西里尔字母标题的分支

svn - 如何配置 TortoiseSVN 以使用在线 BitBucket 存储库?

azure - 从 Azure DevOps Pipeline 调用 Bitbucket 2.0 API