Created
March 29, 2017 07:09
-
-
Save ahmedfaragmostafa/ed0ac1e9a9d6d486c526c5b2f1589f19 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| ##!/usr/bin/env bash | |
| smartCommit(){ | |
| currentBranchName=$(git symbolic-ref HEAD | cut -d'/' -f3) | |
| echo -n "are you want to push with message (y/n)? " | |
| read userOption | |
| if echo "$userOption" | grep -iq "^y" ;then | |
| read msg | |
| echo "$currentBranchName $msg" | |
| git commit -m "$currentBranchName $msg" | |
| else | |
| echo "$currentBranchName fixes" | |
| git commit -m "$currentBranchName fixes" | |
| fi | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment