Advertisement
hocikto19

git add --all, git commit, git push

Jul 24th, 2016
393
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.27 KB | None | 0 0
  1.  
  2. #git function
  3. function gitcp {
  4.   local srvr='origin'
  5.   local message=''
  6.   if [ -n "$2" ]; then
  7.     srvr="$1"
  8.     message="$2"
  9.   elif [ -n "$1" ]; then
  10.     message="$1"
  11.   fi
  12.   git add --all
  13.   git commit -am "${message}"
  14.   git push "${srvr}" $(__git_ps1 "%s")
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement