Answer the question
In order to leave comments, you need to log in
How to find out the relevance of the current branch through the script?
How can I know (not through the console) whether the current branch is up to date or not?
There is a script in which I can pull out the name of the current branch from the config. The base branch is known ( master
).
For example, the current branch test-rebase
.
Basic master
.
How to correctly refer to git to get true/false
(updated test-rebase
from master
or not)?
Is this possible?
Answer the question
In order to leave comments, you need to log in
https://git-scm.com/docs/git-merge-base
git merge-base --is-ancestor <commit> <commit>
Something like this?
if git merge-base --is-ancestor master test-rebase; then
echo merged
else
echo Not merged
fi
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question