Questions tagged [merge-base]
9 questions
11
votes
2 answers
What are the proper use cases of "git merge --squash"?
Some people like git merge --squash due to the reason as follows:
Squashing to a single commit gives you an opportunity to clean up messy WIP commits and provide a good rationale for the changes your are…

Tomoyuki Aota
- 867
- 9
- 18
4
votes
1 answer
git merge-base not working on merged branch
I tried to get ancestor of my branch with git merge-base command on merged branch.
When I try git merge-base develop branch1 it shows sha YYY instead of XXX
* `develop`
|
* merge branch1 into develop
|\
| * `branch1` <- HEAD sha YYY
|/
* sha…

milczi
- 7,064
- 2
- 27
- 22
3
votes
2 answers
Git merge-base produces no result on build server cloned repo
I have the following git branch scenario:
F0---F1---Fn (feature: checked out)
/
---D0--- (dev)
When I issue the command git merge-base dev HEAD on my local repository it returns the commit SHA for D0.
On our build server, which…

steve dunning
- 153
- 2
- 11
3
votes
1 answer
Checking if branch has already been merged into master or dev branches on remote
What I am trying to do is ensure that I can delete local branches safely.
I found some great answers to this question here:
How can I know in git if a branch has been already merged into master?
So we have the source branch and the destination…
user7898461
1
vote
1 answer
Find all merge events between two branches
I'm trying to determine the frequency with which master is merged into a specific release branch. So, I want to know the history of all merge-bases. Is there a way to list all of the merges that have happened between two branches?

fuzzybear3965
- 243
- 5
- 15
1
vote
1 answer
using vimdiff in git-merge, how can I show the commit ids?
I am doing a cherry-pick that resulted in a merge conflict and when I resolve it, the default merge tool, Vimdiff, is opened. With 4 panes, the top being the Local , base , and remote. However I noticed the base doesn't have the version of the file…

dgunc
- 25
- 2
1
vote
2 answers
Git: how to update branch made by merge-base
Suppose that I have 2 branches: v1.0 and development.
Our process is to create local branch using:
git merge-base v1.0 development
git checkout
git checkout -b
Suppose that one of my colleagues follows the same…

mpasko256
- 811
- 14
- 30
0
votes
0 answers
How to set --allow-unrelated-histories on FIRST pull by default?
From git-merge Documentation:
By default, git merge command refuses to merge histories that do not share a common ancestor. This option can be used to override this safety when merging histories of two projects that started their lives…

Ooker
- 1,969
- 4
- 28
- 58
0
votes
1 answer
Unable to understand merge common ancestor output and reason of conflict
I have a branch feature based on my develop branch.
My feature was needed earlier than anticipated in production so I decided to rebase my feature branch on top of my master branch like this (my feature branch has only one commit):
git checkout…

PrOpoLo
- 85
- 5