Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. ##!/usr/bin/env bash
  2.  
  3. smartCommit(){
  4. currentBranchName=$(git symbolic-ref HEAD | cut -d'/' -f3)
  5.  
  6. echo -n "are you want to push with message (y/n)? "
  7. read userOption
  8. if echo "$userOption" | grep -iq "^y" ;then
  9. read msg
  10. echo "$currentBranchName $msg"
  11. git commit -m "$currentBranchName $msg"
  12. else
  13. echo "$currentBranchName fixes"
  14. git commit -m "$currentBranchName fixes"
  15. fi
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement