Tag: git merge

Can I merge a branch from the future at a commit in the past without merging the shared commits between them, or without cherry-pick?

Say I have a tag, v1.5. More commits were made and another branch fix was created at a point ahead of tag v1.5. Now that the fix in fix has been made, it needs to be applied to the released version of the code represented by the tagged commit at 1.5. Is it possible, without […]

How do I manually merge a branch in git?

I merged a relatively old branch into master and the outcome of the merge was an unholy mess. For some unknown reason when I ran git merge it automatically took some of the out of date code that had since been updated in another branch and merged into master. This old branch has only a […]

How to force manual merging in Git / IntelliJ if same file but different lines were edited?

I am not sure whether this is a Git or IntelliJ problem we are facing. Assuming the following using Git integration in IntelliJ: User A changes a text file and commits and pushes this change to branch branch1 User B changes the same text file but in a different line and commits to branch1 User […]

Git merge with cloned projects (best practice)

I’m looking for the best practice for working with GIT. Here is my problem: I have a BASE project and, for each client, I clone it. Because those projects will be very similar (only changes some config files and images), and each web project will be stored in a different directory. So I think the […]

What to do after manually merging in order to complete git pull?

I did a git pull and it told me it couldn’t auto-merge because there were a few conflicting changes that got made on the remote and local concurrently. I did a manual merge. What do I need to do next in order to complete my pull? RELATED: git pull merges no files if any of […]

Merging a git repo from the origin to the upstream repository

Let’s say I have an upstream repository, which I have forked to a new origin. If I want to merge changes from the upstream repo into my forked origin, I would do something like this from within the fork: $ git merge upstream/master How would I go the other direction, from origin to upstream? Say […]

Need help for resolving merge conflicts

I am learning git. I have a file called README which contains a,b,c,d. I created four branches out of master. User on branch 1 changes a to p, user on branch 2 changes b to q, user on branch 3 changes c to r and user on branch 4 changes d to s. Now when […]

How to preserve –no-ff merges after a rebase

Say you have a master and develop branches. Further more, say you workflow is like that: on develop you checkout a new feature branch; work on it; check out develop again; merge the feature branch with –no-ff. This way you can nicely see which commits belong to which feature. * Merge branch ‘feature’ into develop […]

In what order does git apply file modifications when merging?

Let’s say I made several modifications in a file and I keep them in my local repository. Another developer also made several changes on the same file in his/her local repository and pushed them to central. So let’s say I have commits A1 and A2 and he has commits B1 and B2. Chronologically they go […]

git merge changes from another repo

I have inherited some really sloppy code so I created a new repo and ran PHP_Beautifier and php-cs-fixer on the majority of the code. All the while my colleagues have been making their own changes to our existing repo. Now I need to merge those two repos together. The issue I’m running into is the […]

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