Tag: merge

How to do Git conflict resolution using a separate resolution branch?

I have following branches on my local: master branch-a branch-b branch-c dev I created PR (Pull Request) for branch-a (PRA-1), branch-b (PRB-1), branch-c (PRC-1). My colleagues finished reviewing my code. Since I know that branch-a, branch-b, branch-c are going to conflict each other, I create a conflict-resolution branch. I base conflict-resolution from master and continue […]

How are deleted files merged?

Let’s say we have 2 branches: Branch A and branch B, which are basically the same branches at the beginning, both were originated from master branch. Suppose i deleted image_1.png, image_2.png and image_3.png from branch A. I wonder what the difference is between following merges: Case 1: I switch to branch A and merge using: […]

How to merge deleted files from another branch?

I’ve learned how to merge specific files from another branch from this link. However, this post does not work for merging deleted files. I’ve created a git repository to simulate this situation, so you may try this. Here is a example, $git clone https://github.com/gtchoi/SO_question.git $git branch –track test origin/test $git checkout test $git checkout master […]

Revert back to specific state before branches were merged

git overlords, listen to my pleas: I have a git branch, call it “master” (original, I know). Now, I’ve also been working on two other branches, call them “dammit” and “mistake”, simultaneously. When I was done, both branches were merged into “master”, and then to production. Problem is, I suspect some changes made in those […]

After git merge, This branch is 1 commit behind

When doing a git merge (a clean one, no conflict whatsoever), the content of both branches are exactly the same. However GitHub says “This branch is 1 commit behind…”. Looking at the logs, indeed one of them has “merge pull request…” with no file changes. I tried to do another merge, so that they can […]

Git commits always rejected when pushing commit with file added from other branch

I have two branches that diverge more than they should. Since this has been marked as duplicate, let me clarify my question. I already know that I can just do git push -f to force the merge. That’s what I’ve done already several times. My question is more about the inner workings of git. If […]

Merging conflict in git while using patch

I cloned some git repository and I have a patch file that I need to apply on one of the files in my working directory but it gives me a conflict. The patch was prepared by someone else for some testing purposes apparently the needed file was updated on the server but I still need […]

How can I merge a MEAN app with Ionic?

I want to use the same folder of my MEAN app with Ionic. I’ve made a copy of my front end folder and made some changes to work with Ionic on it. Then, tested and exported a fully functional Ionic apk. So, now I want to have only one front end folder, but I’m very […]

Git difftool on current folder?

git difftool -d wasted..master works very well but creates temporay folders for each branch even that I am currently on master. I like to use meld (works with difftool) to actually manually merge some lines in from another branch. I saw git mergetool, but I am afraid its for automation or works differently then difftool […]

How do I make `–cc` the default for merge diffs in Git?

By default, git log -p does not show anything for merge commits. In the case of conflicts, I’d like to see the diff, and git log -p –cc does this. Is there a way to make –cc the default style for merge commit diffs in Git? For more info on –cc diffs, see the COMBINED […]

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