Difference between revisions of "Git"
From neil.tappsville.com
Jump to navigationJump to searchm |
m |
||
Line 6: | Line 6: | ||
Wipe all local changes and get the latest from the repo | Wipe all local changes and get the latest from the repo | ||
+ | git reset --hard or git checkout -- <file name> | ||
git rebase origin/master | git rebase origin/master | ||
+ | |||
+ | Or to store changes and re-apply them after pulling | ||
+ | git stash | ||
+ | git pull | ||
+ | git stash pop |
Revision as of 04:03, 27 September 2019
Local Changes vs Repo
git log origin/master..HEAD
You can also view the diff using the same syntax
git diff origin/master..HEAD
Wipe all local changes and get the latest from the repo
git reset --hard or git checkout -- <file name> git rebase origin/master
Or to store changes and re-apply them after pulling
git stash git pull git stash pop