Find a starting point for rebase -i

I work in a branch (of course, the master fork), and I have a series of commits.
I am interested in knowing exactly which commit is the one where the branch is, and is part of the wizard.

Why do I need it?
I want to squash all commits with interactive rebase, and I was wondering if there is an easy way to figure out what to pass to the rebase command instead of manually counting the commit for the transferHEAD~52

+4
source share
1 answer

git merge-base takes two commits (which, as usual, can be commit-hashes, branch, tags, etc.) and returns a common ancestor they both deviated from.

:.

mureinik@comupter ~/src/git/myproject [master] $ git merge-base master feature-1
7c2232a4dd6c54ee8cc3f693ab8a0020ad82410b
+3

Source: https://habr.com/ru/post/1649861/


All Articles