git remote add upstream [Upstream git URL]
git fetch upstream
git merge upstream/master
git checkout -b "feature-new-stuff"
git push origin feature-new-stuff
git log --graph --decorate --pretty=oneline --abbrev-commit
Squash to 1 commit. https://blog.carbonfive.com/2017/08/28/always-squash-and-rebase-your-git-commits/
git rebase -i HEAD~[NUMBER OF COMMITS]
OR
git rebase -i [SHA]
git push origin branchName --force
git checkout master
git pull origin master
git checkout branchName
git rebase master
Handle any conflicts and make sure your code builds and all tests pass. Force push branch to remote.
git push origin branchName --force
git checkout master
git merge branchName
git push origin master
## Clear local and start from upstream branch again.
git reset --hard upstream/master git reset --hard upstream/develop