GitTips
My number one git tip for day to day use rather than specific scenarios is setting up aliases for everything.<p>Along with the ones provided by the git oh-my-zh plugin I have these[0].<p>Some examples<p>+ gco - git checkout<p>+ ga - git add<p>+ gc - git commit<p>+ gp - git push<p>+ gl - git pull<p>+ gpc - Pushes current branch to origin<p>+ gpcfl - Force pushes the current branch to origin using --force-with-lease<p>+ glc - Pulls curent branch from origin<p>This is my favourite though<p>function goops { git add -A "$@" && git commit --amend --no-edit && gpcfl }<p>Used like this `goops file`, it adds the file, amends the last commits and force pushes the branch. Super useful because I tend to realise I forgot something just after I push. Don't do this on shared branches though, force pushing should only happen to branches were you are the only one working on the branch or in coordination with anyone else working on the branch.<p>0: <a href="https://github.com/k0nserv/dotfiles/blob/master/files/zshrc.symlink#L14-L20" rel="nofollow">https://github.com/k0nserv/dotfiles/blob/master/files/zshrc....</a>