Shorthand for using git (bash/zsh alias):
alias g=git
Undo the last commit:
undo = reset --soft HEAD^
Get a summary of commits since yesterday (useful during standups):
standup = !"git log --reverse --branches --since=$(if [[ "Mon" == "$(date +%a)" ]]; then echo "friday"; else echo "yesterday"; fi) --author=$(git config --get user.email) --format=format:'%C(cyan) %ad %C(yellow)%h %Creset %s %Cgreen%d' --date=local"
Push to origin:
pp = push origin
Force push to origin:
ppf = push origin --force-with-lease
Pretty log:
lol = log --pretty=format:"%C(yellow)%h\\ %Cblue%G?%Cred%d\\ %Creset%s%Cgreen\\ (%cr)%Cblue\\ [%cn]" --decorate --graph
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Shorthand for using git (bash/zsh alias):
alias g=git
Undo the last commit:
undo = reset --soft HEAD^
Get a summary of commits since yesterday (useful during standups):
standup = !"git log --reverse --branches --since=$(if [[ "Mon" == "$(date +%a)" ]]; then echo "friday"; else echo "yesterday"; fi) --author=$(git config --get user.email) --format=format:'%C(cyan) %ad %C(yellow)%h %Creset %s %Cgreen%d' --date=local"
Push to origin:
pp = push origin
Force push to origin:
ppf = push origin --force-with-lease
Pretty log:
lol = log --pretty=format:"%C(yellow)%h\\ %Cblue%G?%Cred%d\\ %Creset%s%Cgreen\\ (%cr)%Cblue\\ [%cn]" --decorate --graph