美文网首页
git查看分支历史动向记录

git查看分支历史动向记录

作者: kingTao_ | 来源:发表于2023-03-23 16:57 被阅读0次

git查看分支历史动向记录

git reflog --date=local |grep branchname

$ git reflog --date=local | grep test2

39cca77 HEAD@{Fri Mar 24 15:18:52 2023}: merge test2: Fast-forward // master分支执行 git merge test2
19e2ef4 HEAD@{Fri Mar 24 15:18:48 2023}: checkout: moving from test2 to master // git checkout master
39cca77 HEAD@{Fri Mar 24 15:18:05 2023}: commit: test2 // test2分支 git commit -m "test2"
f5a8528 HEAD@{Fri Mar 24 15:17:48 2023}: checkout: moving from test1 to test2  // test1分支执行 git checkout test2【这一行不能说明test2从test1检出】

git 查看分支来源和commit记录

git reflog show branchname

$ git reflog show test2
69b949a (HEAD -> master, test3, test2) test2@{0}: commit: test2 // test2 commit
dae0eeb (test1) test2@{1}: branch: Created from HEAD // test2来源于test1

$ git reflog show test3
69b949a (HEAD -> master, test3, test2) test3@{0}: branch: Created from HEAD // test3来源于test2,master, test3, test2无差别

$ git reflog show test4
4740e0b (test5, test4) test4@{0}: commit: test4 // test4 commit
69b949a (HEAD -> master, test3, test2) test4@{1}: branch: Created from HEAD // test4来源于test2,master, test3, test2无差别

相关文章

  • Git小结

    git branch 查看所有的分支git log 查看当前分支的历史记录git log branch_name ...

  • git回滚命令

    01:git log 查看提交历史。 02:git reflog 查看所有分支的所有操作记录。 03:git re...

  • GIT常用命令备忘

    Git配置 Git常用命令 查看文件diff 查看提交记录 Git 本地分支管理 分支合并和rebase Git补...

  • Git 撤销pull命令

    首先通过 git reflog master 查看 master 分支历史变动记录 找到 pull 之前的comm...

  • git切换分支

    记录下git切换分支及相关命令 1.查看分支 查看本地分支 查看远程分支 查看所有分支 2.切换分支 如果分支存在...

  • git常见使用 场景

    给分支 标记tag git checkout branchName切换到 分支 git log查看分支 提交记录i...

  • git常用命令 ,竖线左侧是zsh命令,右侧是git命令

    复制其他分支的文件夹或文件 单独拉取一个commit记录 查看git配置 查看git 记录 操作分支

  • git命令

    查看分支 查看本地分支:git branch 查看远程分支:git branch -r 查看所有分支:git br...

  • Git 基本用法

    克隆 查看git状态 创建新的分支 切换分支 删除分支 添加新文件 提交 分支推到远程分支 查看提交记录 查看所有...

  • git常用命令

    分支管理 git 切换分支 git 查看远程分支 git 查看本地分支 git 创建本地分支 git 删除本地分支...

网友评论

      本文标题:git查看分支历史动向记录

      本文链接:https://www.haomeiwen.com/subject/szpirdtx.html