Tag: merge

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

Merge conflict resolution over new code

Let’s say I have some code that is ordered, but the ordering is not a technical requirement. apple kiwi strawberry And then I have two topics that I want to merge in, whose diffs look like: TOPIC BRANCH: orange kiwi + orange strawberry And also TOPIC BRANCH: pear kiwi + pear strawberry Is there a […]

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