Tag: git merge

Have a feature branch in git and can't merge master after reverting a merge from a different branch

We have implemented a kind of git flow workflow in our company but not everyone is actually using git flow yet so there are some hiccups. Here is one. A colleague was working on a feature branch and needed some bug fixes that are currently in master and develop. However, he got confused and merged […]

How do I delete a Git merge?

This question already has an answer here: Undo a Git merge that hasn't been pushed yet 24 answers

git merge going wrong?

ORIGINAL: “<tasks>” + ” <exec command=”ls”>” + ” <runif status=”failed” />” + ” </exec>” + ” <exec command=”ls”>” + ” <runif status=”failed” />” + ” </exec>” + “</tasks>”; MODIFICATION_1: “<tasks>” + ” <exec command=”ls”>” + ” <runif status=”failed” />” + ” </exec>” + “</tasks>”; MODIFICATION_2: “<tasks>” + ” <exec command=”ls”>” + ” <runif status=”passed” />” […]

Can git merge/pull detect when “local changes” are the same as an incoming merge conflict?

I run into this sometimes: On server, git clone myrepo Change foo.sh on machine 1 to solve some problem. It works, so replicate the change on my development machine. On dev machine, git add foo.sh, git commit, git push On server, git pull remote: Counting objects: 1, done. remote: Compressing objects: 100% (1/1), done. remote: […]

Merge files with different end-of-line character

I work with GIT on Linux, and my colleague works with GIT on Windows. I commited some changes to a file, and my colleague commited some other changes to that file. My colleague pushed, and I pulled. Now, my entire file is a one big conflict: <<<<<<< HEAD … [my version] …. ======= … [colleague’s […]

Find which merge strategy has been used for a merge commit?

Let’s take a simple example, where I merge a topic branch into master using the merge strategy “ours”. This merge creates the H commit, and after I do some other commits. A—B—C topic / \ D—E—F—G—H—I—J—K master I would like to know, if it is possible to determine afterwards which merge strategy was used on […]

How to resurrect old feature in same git branch?

I’d like to think that my problem is potentially rather common and it ought to have well-known solution or best-practice. Unfortunately every solution I’ve found and/or tried present some kind of undesired side effect. My repo basically looks like the following, even though in my real repo there are 25 or so commits between E […]

Git commit hell

On our project we have 2 git branches, ‘develop’ and ‘featureBranch’. Since featureBranch was forked off of develop, develop has been updated with a number of commits. Now I want to merge featureBranch back into develop. To test for any bugs, I did a rebase on featureBranch to pull in the latest code from develop, […]

How to use git merge-base on remote?

How can use merge-base with Git on a remote repository without checking it out? Using ls-remote works fine e.g. for determining branches like this: git ls-remote –heads $REPO_URL/$REPO_NAME The documentation contains no clue, wether the use of merge-base with ls-remote is possible. Maybe it is also possible, to use alternatives to merge-base to find the […]

Git pull into an untracked copy of repo

So in an ideal world, when I started this project, I would have cloned from a source, and then committed all my changes to this repo. When the main project was updated, I could pull those changes into my repo. (This is one way traffic, no pushing going on.) However, when I started, I did […]

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