Tag: merge

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 […]

How does git know which version of a line to keep?

I am working a on project which is released in a stable version once in a while. When we release a version we start developing the next version from the current HEAD. The old version is however is still supported, put on it’s own branch and receives various minor fixes and features. When I apply […]

git checkout: detailed meaning of “theirs” and “ours”

The git checkout documentation says: –ours –theirs When checking out paths from the index, check out stage #2 (ours) or #3 (theirs) for unmerged paths. What’s the meaning of “stage #2” and “stage #3” during merge, rebase and cherry-pick? Is there a way to query theses “stages” before running the command to make sure it […]

Merge two repositories (original project and changed project WITHOUT HISTORY)

I have two repositories: Gephi (big open source project) hosted on github Project of my company based on gephi 7 months ago, when our project started, somebody took a snapshot of gephi project on github and save it to corporate svn => change history loss now i decided to move our project to git repository […]

Git – How to remove work from origin, but merge back in later from another branch?

I have the master branch that has a bunch of features in it that will not be released. I was asked to remove those features from master and create a new branch that that has them in it so we can merge back to master later. The steps I took were: Create a new branch […]

git multiple project merging

We will be forking a project into its own codebase, but it will closely follow the project it forked from. I see it working like this: Forked project will develop some initial changes to rebrand product. I wouldn’t want to share these changes with the original project, but going forward I want to merge changes. […]

Moving part of a git repository’s history into another repository

There are lots of posts on here about moving a folder out of one repository into a new repository using git filter-branch; what I need to do is move a single file into a new repository. I’ve already created the new repository, and added the old one from the filesystem as a ‘remote,’ and created […]

GitLab unable to automerge. Merge request contains merge conflicts that must be resolved

GitLab is unable to automerge requests. All merge requests get the message “This merge request contains merge conflicts that must be resolved. You can try it manually on the command line” The message seems incorrect, and I tested this by creating a new branch with “git branch -b new-branch-name” and change a file that is […]

What exactly is a content level merge?

What is exactly is a content level merge? I’ve heard this term used a couple times in git discussions.

Making two branches identical

I have two branches – A and B. B was created from A. Work on both branches continued in parallel. Work on branch A was bad (resulting in a non-working version) while work on branch B was good. During this time branch B was sometimes merged into branch A (but not the other way around). […]

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