Guest User

Untitled

a guest
Jun 20th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. #
  2. # GIT
  3. # Git stuff made by Kuroir
  4. #
  5. alias gc="git commit $1"
  6. alias gcm="git commit -m $1"
  7. alias gca="git add -A; git commit -m $1"
  8. alias gcap=git_add_all_commit_and_push
  9. alias gs='git status'
  10. alias gf='git fetch'
  11. alias gm="git merge $1"
  12. alias gp="git push"
  13. alias gpl="git pull $1"
  14. alias gpom="git pull origin master"
  15. alias ga="git add $1"
  16. alias grm="git rm --cached $1"
  17. alias gch="git checkout $1"
  18. alias gb="git branch $1"
  19. alias gba="git branch -a"
  20. alias gr="git reset $1"
  21. alias grh="git reset --hard"
  22. alias gst="git stash $1"
  23.  
  24. # PS1
  25. PS1='\[\e[0;31m\]\w$(parse_git_branch) \$\[\e[m\] '
  26. # Git commit and push function
  27. function git_add_all_commit_and_push () {
  28. git add -A;
  29. git commit -m "$1";
  30. git push;
  31. }
  32. function parse_git_branch {
  33. git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\ (\1)/'
  34. }
Add Comment
Please, Sign In to add comment