Skip to content

Merge Parallel Fork

gtzelepis edited this page Dec 15, 2014 · 8 revisions

Prepare your branch

  1. git commit -m'commit message' any working directory changes or git stash if you intend to apply them after the merge. (this is necessary if you don't want to lose working directory changes in step 2)
  2. git checkout <branchname> (eg. git checkout develop) for the branch you intend to merge into.
  3. git status to check everything is ok.

Add a friendly name remote to the branch you intend to pull from

  1. git remote add <friendlyname> <git url> (eg. git remote add ioannisstenos https://github.com/ioannisstenos/e-science.git)
  2. git fetch <friendlyname>
  3. git merge <friendlyname>/branch (eg. git merge ioannisstenos/develop)
  4. git push if needed to update your origin.

Using a visual diff / merge tool to resolve conflicts

  1. sudo apt-get install meld
  2. git config --global diff.tool meld
  3. git config --global difftool.prompt false
  4. git config --global merge.tool meld
  5. git config --global mergetool.prompt false
  6. git config --global mergetool.keepBackup false

git difftool | git mergetool

Clone this wiki locally