Gists
My code snippets are hosted on GitHub’s Gists.
I plan to move them here eventually.
Latest: git
update feature branch with latest changes to main/master
in the feature branch:
alias gmm='git fetch origin `git branch -l master main | sed 's/^* //'` && git merge `git branch -l master main | sed 's/^* //'`'
set upstream for a new branch
function newupstream { git push --set-upstream origin `git rev-parse --abbrev-ref HEAD` } # use this to set upstream for a new branch