2
0
mirror of https://github.com/chubin/cheat.sheets synced 2024-11-03 15:40:17 +00:00

Merge pull request #13 from KindDragon/patch-1

[git] Added command for reset and checkout branch
This commit is contained in:
Igor Chubin 2018-07-27 19:50:53 +02:00 committed by GitHub
commit 80f7d2f460
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -129,6 +129,9 @@ git checkout --orphan branch_name
# Checkout a new branch from a different starting point
git checkout -b master upstream/master
# Reset local branch to upstream branch and then checkout it
git checkout -B master upstream/master
# Remove all stale branches (ones that have been deleted on remote)
# So if you have a lot of useless branches, delete them on Github and then run this
git remote prune origin