Git - sjherrick/code-base GitHub Wiki
- Discarding local changes (permanently) to a file:
git checkout -- <file>
- Discard all local changes to all files permanently:
git reset --hard
- Switch to master and merge
git checkout master
git merge new-branch
- Local
git branch -d branch_name
- Remote
git push <remote_name> --delete <branch_name>
- Stash changes when you want to quickly switch branches
git stash
- Retrieve most recent stash
git stash pop
- List stashes and pick the specific one to pop
git stash list
git stash pop stash@{1}