Created
October 27, 2020 03:13
-
-
Save ralexandr/b8d48892065e9581866bd9c494bdaac8 to your computer and use it in GitHub Desktop.
Git shell aliases
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copy-paste following code to your .bashrc/.zshrc file and restart your terminal session (or run 'source ~/.bashrc' command) | |
# git | |
alias gs="git status" | |
alias gp="git pull" | |
alias gpo="git push origin $1" | |
alias gb="git branch" | |
alias ga="git add ." | |
alias gc="git pull && git commit -m $1" | |
function git_checkout_branch() { | |
git checkout -b "$@"; | |
git push --set-upstream origin "$@"; | |
} | |
alias gcb="git_checkout_branch $1" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Then you will be able to check if there is some remote updates and create new commit by typing smth like:
gc "Some awesome commit message"
Or create new branch, switch to it and push it to remote repo