Skip to content

Instantly share code, notes, and snippets.

@jeremiahlukus
Created October 31, 2018 14:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeremiahlukus/9db73d8c3e9e137c5df0d974b2246e9e to your computer and use it in GitHub Desktop.
Save jeremiahlukus/9db73d8c3e9e137c5df0d974b2246e9e to your computer and use it in GitHub Desktop.
" Ex: acp "My commit message"
function acp (){
git add -A && git commit -m "$1" && git push
}
"Ex: gco -b my_new_branch
" gco master
alias gco="git checkout"
"See all the code chnages you have made line by line compared to master
alias diff_master='git diff --name-status master'
"See all the code chnages you have made line by line
git diff
"Undo a git push
alias gundo="git push -f origin HEAD^:master"
"See all the files you have changed in a list
alias gs="git status"
"Merge master into branch
gco master
git pull
gco my_branch
git merge master
git push
" How to squash your commits on branch when ready to merge master
gco test_branch
git reset master
gco master
acp "My commit message"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment