Friday, February 13, 2015

Always have to search Stackoverflow for these git tips, so thought I would bang them into one place.

How to merge either all local or all remote changes

Single File

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

Or for all files

git checkout --ours .
git checkout --theirs .
git add .
git commit -m "using theirs"

How to delete a remote branch

git push --delete origin branch

How to create a branch off a branch

git checkout -b featureBranch existingBranch

No comments: