Sam Doidge

Continual improvement

Git Tips

Conflicts – if you just want to choose one version of the file or the other, you can use:

git checkout --ours filename.c

or

git checkout --theirs filename.c

Then mark as resolved and commit through:

git add filename.c
git commit -m "using theirs"

Copying a specific commit from one branch to another, goto the the branch you want to bring the commit into, and reference the commit hash:

git add filename.c
git cherry-pick e87568fa

And you are done :)