Tag: git merge

How git-merge and git-rebase behave with a topic branch forked off of another topic branch?

Let us suppose the repository looks like this: master | A–B–C–K–L–M \ E-F-G |\ | H-I-J topicA | topicB What would git merge topicB do when in master? Would it apply commits H, I, and J only? or all the commits from the initial fork point of topicA? What would git rebase master topicA do? […]

Git merge: why I saw some are “Merge branch 'master' of github.com:foo/bar”, and some are “Merge remote-tracking branch 'origin/master'”?

Git merge: why I saw some are “Merge branch ‘master’ of github.com:foo/bar”, and some are “Merge remote-tracking branch ‘origin/master’”? In my understanding, “merge” always merge remote tracking branch.

Git syncing branches from branches

Let’s say I’ve created a branch “B” off of an old tag from “A”. I make some changes on “B” and open a pull request back against “A”. I then make a “C” branch off of “B”, which I make changes to and open a pull request, etc, until I reach branch “E”. Once I […]

Steps after automatic merge fails / manual merge

So if I do a git pull origin master and then the automatic merge fails I then manually merge, by removing the git notation from conflicted files, and “cherry picking” what I want, and don’t want. But after I do the manual merge, what is the right steps to take next? My guess is: git […]

Pull a commit into another branch exactly (without merging)

I have a structure similar to below: C1 — C2 — C3 \ — C4 I want to pull C3 on back on top of C4. (NB: C3 & C3a hold the save files) C1 — C2 — C3 \ — C4 — C3a If I try to merge or pull I am just told […]

Patch deployment – git doesn't fetch the latest remote commit

I need to apply a patch but: The patch (.sh script to run) breaks the website (a little). I fixed the pages broke by the patch and committed the modifications in git. The patch modify both the file system and database. The patch cannot be applied if it detects that some of its content is […]

Discard Git commits & merge feature branch back to Master

First I worked and made 3 commits on Master branch: Wijzing 1, 2, 3. Then I did checkout… on commit Wijziging 1. Then I created a new branch new-feature and started making changes. Now I want to throw away the 2 commits: Wijzing 2 and Wijziging 3. And I want to merge the new-feature with […]

override merge two branches in Git

Is there any way to merge branch A into B and Override anything in B with what with A no matter if there are conflicts or not?

Explanation of 1 commit ahead of master and 1 commit behind master

I just updated my branch on GitHub with a push. I wanted to add some files that were taken out before. After the merge, my work should match the work on the master branch and everything on both branches should be up to date, but it still says “1 commit behind master”. I also saw […]

Does Git support automatic merge conflict resolution for append-only files?

In our project, we store localized strings in an XML file that is loaded by the application. These files are managed by a localization management tool, we don’t edit the files directly. Now whenever two developers add new localized strings on different branches, they produce merge conflicts. In the majority of the cases, localization strings […]

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