Tag: merge

Select git mergetool based on file type

When running git mergetool, I’d like to have git select the merge tool used based on the file extension. How can I do this? A similar question was asked here: Git: configure patterns for difftool and mergetool and the answer was to write a custom merge driver. However, it seems like this would be executed […]

obtaining full file paths in git merge

I’m working on a tool to analyse the output of merging many topic branches and produce a detailed conflict report. I’ve run into a slight problem in that sometimes Git will produce a truncated file name in the merge command’s output, such as Merge made by recursive. …/somepath/anotherpath/toolong/default.css | 2 +- When in other cases […]

Merging selective lines of code using Git?

I would like to force git to always merge using a (kind of) 3-way conflicts resolution. Moreover, I want to do it to the point of being able to choose single lines. At the moment I am merging two branches. However, if possible, I’d like to know how to perform this task even when merging […]

Is there anyway with Jenkins Git plugin to set merge-strategy option to 'theirs'?

I’m using Jenkins with the Git Plugin. Facts: I have 2 branches develop and rc with the same ancestor. develop is at commit 635d361d2005f74dd55f274bf409d43d6413d9b0 I’m try to merge develop it into rc A change has been made to a file x.html independently in both branches that causes a conflict when merging I always want develop […]

Git rename detection of empty file

I recently hit a problem where an empty file was renamed differently in two branches but merged without a conflict being raised. Steps to recreate are as follows. Create an empty file. git init touch empty git add empty git commit -m “add empty file” Rename it in the branch. git checkout -b branch git […]

How do I go to the next conflict in the Xcode merge tool?

When I choose to merge a git branch into another via Xcode 5, I get an interface that shows me all the files that are going to be changed including those with conflicts. Before I go ahead with the merge, I am supposed to click on each file with a red C and fix the […]

Is it right to use git cherry-pick in these scenarios?

I apologize if my notation or terminology is wrong. I have been using git for a while on my personal projects and haven’t had to deal with complicated merging scenarios. We started using it at work and are running into more complex scenarios. I am still a git newbie so I’d like to figure out […]

Git: how can git/linux maintainers maintain so many branches

Personally, if I look at the git or the linux repo with gitk, I am totally overwhelmed by the huge amount of merges/branched. I have absolutely no clue what is going on. I assumed that in general you try to have an as linear history as possible and only a few branches (e.g. master, maint, […]

Is it possible to merge in Git without being on the merged-to branch?

Today I was using Git and something happened to me which I didn’t know how to deal with. I was on branch development, and I did git fetch to get the new origin/master. I wanted to merge origin/master into master, and end up with the updated master checked out. Normally, I would do this: git […]

Why does git sometimes mark added lines as changed lines (i.e. an empty conflict over an added piece of code)

I still don’t have a confirmed way to reproduce this but in case this is some well known issue, I’ll ask it anyway. What happens is that git often creates conflicts like this: <<<<<<< HEAD } // action_do_add ======= } // action_do_add …lots of code here… >>>>>>> some_branch So instead of noticing that I simply […]

Git Baby is a git and github fan, let's start git clone.