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:
commit
80f7d2f460
@ -129,6 +129,9 @@ git checkout --orphan branch_name
|
|||||||
# Checkout a new branch from a different starting point
|
# Checkout a new branch from a different starting point
|
||||||
git checkout -b master upstream/master
|
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)
|
# 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
|
# So if you have a lot of useless branches, delete them on Github and then run this
|
||||||
git remote prune origin
|
git remote prune origin
|
||||||
|
Loading…
Reference in New Issue
Block a user