Tag: git merge

How to re-merge a branch, after a partial merge was performed

So I’ve performed a partial merge (via git merge –no-commit) to only bring in some changes from a featureA branch. Then merged in a featureB branch. And now I need the rest of the changes from featureA. Git says there’s nothing to do if I merge featureA again, because Git thinks it’s already been merged. […]

Aborting a merge in git – Best practice

Say you are in a branch topic, you have been working for a while and want to merge in some commits from master. You run git merge and there are a few conflicts. But you don’t have time to resolve the merge conflicts now, and you want to return to the state that you were […]

Git: regular merge/rebase of long-living bugfix branches to master

Context We use several git repositories with the same workflow, involving two branches, and are wondering how best to “synchronize” commits from one to the other. Put simply, our git repositories contain: Long living branches Two branches: master (branch for ongoing development) 1.0 (branch for bugfixes only, to maintain a stable version) Both branches are […]

Git rebase or merge

I understand that re-base is good for situations when you want to add a fix to a base branch and put it in all other branches. but it seems much more complicated than a merge(much more conflicts). Am I missing something?

Afraid git commit and push will accidentally overwrite changes

I am working on a project with a friend using a remote git tool bitbucket.org. So far that we have been working on the master branch at different times, and then commit and push those changes to the remote site for the other to use. Now he has committed and pushed his changes out to […]

git blame while resolving merge conflicts

I often rebase a large open source project and there are merge conflicts where I need to figure out who made the change and when it order to decide as to which change to take. So generally what I do is that I go to both repos and look at the file and do a […]

correctly rebase a merge

Another git question… I am in the following situation: A1 —- B1 —- C1 \ > D —- E —- F / A2 —- B2 —- C2 Where {A1,B1,C1} and {A2,B2,C2} have no files in common (it’s the consequence of merging two different repositories, so I have currently two roots) I would like the history […]

How can I override the merge-base in a git merge?

My repository has cherry-picks recorded as merges. It throws of git‘s selection of merge-base. Is it possible to specify the merge-base? If so, how? Example: f is branched from master at A. C is cherry-picked to f, but misleadingly committed as a merge with K and C as parents. A-B-C master \ \ K—C’-L f […]

Git: Determining merge changes when no conflicts

When we do typical merges (ie: from branch A to B) with conflicts I can see the differences by running: git status git difftool –dir-diff –cached But if there are no conflicts then these commands don’t return any results. We run git push to push the changes to the remote repo (branch B in this […]

how do I undo another developers git push to the master branch

This seems like it would happen all the time, but i can’t find an answer. what happened: Another developer has git merged a branch with the master branch on their local server resulting in conflicts. Then git added the conflicts, git committed, and git pushed the changes & conflicts to the master branch. Dropped his […]

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