-
-
Save akashnimare/5bc9a1afd29ac07a5a95198037297ed5 to your computer and use it in GitHub Desktop.
From http://paolo.fr/
This file contains 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
function commit() { | |
local b | |
local r | |
b=$(git rev-parse --abbrev-ref HEAD) | |
r=$(git remote) | |
read -e -p "Message:" msg | |
read -e -p "Branch [${b}]:" branch | |
read -e -p "Remote [${r}]:" remote | |
if [[ -z "$msg" ]]; then | |
msg="Update..." | |
fi | |
if [[ -z "$branch" ]]; then | |
branch=$b | |
fi | |
if [[ -z "$remote" ]]; then | |
remote=$r | |
fi | |
{ | |
git add -A . | |
git commit -m "$msg" | |
git push $remote $branch | |
} > /dev/null | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment