mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-26 13:53:05 +00:00
Update cheatsheets
This commit is contained in:
21
git-merge-base
Normal file
21
git-merge-base
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# git merge-base
|
||||
|
||||
> Find a common ancestor of two commits.
|
||||
> More information: <https://git-scm.com/docs/git-merge-base>.
|
||||
|
||||
- Print the best common ancestor of two commits:
|
||||
|
||||
`git merge-base {{commit_1}} {{commit_2}}`
|
||||
|
||||
- Print all best common ancestors of two commits:
|
||||
|
||||
`git merge-base --all {{commit_1}} {{commit_2}}`
|
||||
|
||||
- Check if a commit is an ancestor of a specific commit:
|
||||
|
||||
`git merge-base --is-ancestor {{ancestor_commit}} {{commit}}`
|
||||
Reference in New Issue
Block a user