Tag: merge

Merge current branch into HEAD

Master HEAD has a few changes and I’m trying to merge my current local changes with the Head. Suppose I have conflicting changes. git just refuses to pull. It says I have conflicting changes, so in this case I expect it to tell me the files that have conflicts but it expects me to revert […]

In Git is there a way (or tool) to merge by comparing changes, not files?

In Git the standard merge algorithms let you compare the final state of the files in the two branches, which means I have to remember or guess what the changes leading up to that point in both branches were. Setting merge conflictstyle=diff3 in .gitconfig helps, by showing the common ancestor. However, I still have to […]

Git: How do I selectively copy changes from master to branch?

I created a branch myBranch from the master repo some time ago. Since then, several changes have been pushed to master and now I need to make sure some of these changes, but not all of them, make their way into myBranch. In other words, only some modified files need to be copied from master […]

Find when a branch was merged

There are lots of scripts floating around on the internet for deleting already-merged branches such as $ git branch –merged master | grep -v master | xargs -n 1 git branch -d but I’d like to keep my branches around for a while before doing the cleanup. So: How can I find when a particular […]

How to merge two branches that are too much different from each other in git

I have two branches master (which is very old) and new. What I want to achieve is basically to make new branch to be master. I tried to merge, but without success. The result of the merge was still not master branch became identical to new branch. I tried to rebase, but also without success, […]

How do I find if a branch has been merged to any branch (not just a specific one)

I’m trying to clean up some branches in a fairly large project. We essentially have master, a bunch of release branches (of which only the most recent is maintained), and feature/bug fix branches off each release. The process is normally bugfix/feature-branch -> current-release-branch -> master Now I can see there’s quite a few old feature/bugfix […]

Git merge branch already up to date, yet has modifications pending

I’m new to git, and have two branches i’m trying to merge (newDevelopment and master). I messed up the file tracking somehow on my newDevelopment branch, and because so, I cannot merge the changes into master. I’ve tried renaming the branch and merging to no avail. Here’s what i’m looking at: blabla@ip:/vol/apps/staging/current$ git diff –name-status […]

I just want my development branch to prevail (over master), I don't want to resolve any conflicts

I have two branches, master and development. When trying to merge development into master with git merge development, I get loads of conflicts. I’m not interested in resolving any conflicts, I just want the master branch to be an exact replica of development – how do I accomplish this?

Melting together merge commits

This question is very related to git rebase interactive: squash merge commits together. Suppose you are writing a new feature for a certain project. You start from a certain branch, say devel, and you build a branch for your feature, feature/X. From time to time you also find some issues in the project, so you […]

Git hub – I need list of branches merged into master after particular commit

I need list of branches merged into master after particular commit From master branch for a particular commit (A), I took branch X, Y & Z. I have merged back branch X & Y to master. A————————————– master |\ / / | B—–C— Branch X / |\ / | —–D—–E—–F- Branch Y | | C–E–H–K […]

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