Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ##!/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
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement