Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Clavin June
Clavin June

Posted on • Originally published atclavinjune.dev on

     

Find Git Branching Point Between Branch

Sunday Snippet #20 find git branching point between branch

➜  pet git:(master) git--no-pager log--oneline-12422e70(HEAD -> master, origin/master) update README.md➜  pet git:(master) git checkout-b testingSwitched to a new branch'testing'➜  pet git:(testing) git commit--allow-empty-sam"first"[testing 8210c2d] first➜  pet git:(testing) git commit--allow-empty-sam"second"[testing feb9b4f] second➜  pet git:(testing) git commit--allow-empty-sam"third"[testing 7120047] third➜  pet git:(testing) git--no-pager log--oneline-47120047(HEAD -> testing) thirdfeb9b4f second8210c2d first2422e70(origin/master, master) update README.md# how to get this branching point (2422e70) from `testing` branch?# git rev-list --boundary branch1...branch2 | grep "^-" | cut -c2-➜  pet git:(testing) git rev-list--boundary testing...master  |grep"^-" |cut-c2-2422e70001b80d186fdd1df1a9227dc3d8e0061e
Enter fullscreen modeExit fullscreen mode

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

a bunch of perceptrons
  • Location
    Jakarta, Indonesia
  • Joined

More fromClavin June

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp