Skip to content

Instantly share code, notes, and snippets.

@skiold
Created July 2, 2013 14:14
Show Gist options
  • Save skiold/5909653 to your computer and use it in GitHub Desktop.
Save skiold/5909653 to your computer and use it in GitHub Desktop.
notes on git, merging and workflows
# notes for a internal session on merging
* keep a helper copy of the repo around. Its cheap!
* pick files from a given copi using : git checkout branch_name -- path/to/file
* 'git diff --cached' to double check (eg unmerged files)
* 'git merge -s theirs/ours'
* 'git diff 4_stories_page...4_pagination '
## git config
merge.conflictstyle = diff3
rerere.enabled = true
## git rerere
clean branches without rebase
## git mergetool
## git workflows
git checkout topic
git merge master # conflict happens, no need to rerere if fast-forwarding)
git rerere
git mergetool
[test stuff]
git reset HEAD^
To finally merge into master
git checkout master
git merge topic
## vimdiff
Does not support 3-way diff3 git format
maybe http://sjl.bitbucket.org/splice.vim/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment