Tag: merge

How can I save an incompletely merged index in git?

I’m working on a lenghty merging process with several conflicts. What can I do to save the intermediate state, in order to periodically keep backups in case disaster strikes?

How to merge code and resolve conflicts more easily using git?

There is a great option –patch which can be used with git add. Using this option I can easily review all my changes and decide which chunks should be added to staging area. This interactive process can be made through all modified files. I am looking for something similar for resolving conflicts. After rebase or […]

Git – Merge branch from a different repository

I hope this does not seem to obvious. I have two git repository. We decided to split one branch from the first repoistry into a git sub module. Now I have been using this sub module, however people have been pushing commits to the first repository into the branch that was made into a sub […]

Rewrite a merge commit into a squash merge commit

I made a merge of a long lived branch and it took me time to complete the merge because of the conflicts resolution. I found out that I cannot publish my work with git-svn: git svn rebase will rebase all the commits of the merged branch instead of submitting one single merge commit. I discovered […]

How does git handle commits in a merge?

I’m having trouble understanding how a git merge works in terms of the commits created by the merge process. I’ve read the relevant sections in pro git and the git community book, but am still confused. Consider this scenario: I have an “origin” git repo: master | a0–a1–a2–a3 \ -b0–b1 | branch2 I clone this […]

Git: restore diverged repository after failed rebase

I ran a git pull –rebase, and aborted this after fixing several merge-conflicts using git rebase –abort. Before the attempted rebase, git status told me: “Your branch is ahead of ‘origin/master’ by 20 commits.” Now I get: “Your branch and ‘origin/master’ have diverged, and have 15 and 5 different commit(s) each, respectively.” I have already […]

Git merge: why do I get a lot of merge conflicts after modifying the source on both linux and windows?

I was doing some work at home over the weekend and used git to merge code changes back to my office computer (connected via a vpn) and found some very ugly merge problems. First of all the merge should have been very clean as everything was committed at the office on Friday and I only […]

Is there a way with Git to make future merges ignore version number difference in a pom file between branches?

My team is planning to switch from Perforce to Git and I am trying to find a way to make Git ignore pom version differences between branches. This works well in Perforce and I’m not having any luck reproducing the behavior with Git. Here are my steps: Checkout parent branch ndeckard@ws /c/dev/proj/testgit (master) $ git […]

Fix permissions with git post-merge

On one server I work on, we must log in as root (for reasons I won’t get into here). We have a git repository set up which is used for the web server, but since files are created as root, files modified by git have the wrong permissions. I created an incredibly simple post-merge hook […]

GIT :: Merging 2 branches overwrite the content in one branch with the other

I am experiencing a wild issue. I have my entire project in the master branch. Earlier, one guy was working on this project, but it was in SVN. He made some changes and I need to integrate those changes with mine. Both projects have the same folder structure, the only difference is the type of […]

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