Skip to content

Instantly share code, notes, and snippets.

@Carleslc
Last active May 13, 2019 16:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Carleslc/18c821b5b677a34cbe57525178ea3257 to your computer and use it in GitHub Desktop.
Save Carleslc/18c821b5b677a34cbe57525178ea3257 to your computer and use it in GitHub Desktop.
Git utility for grouping pull/status & add/commit/push
#!/bin/bash
set -e
if [ "$1" == "-h" ]; then
echo "Pull & Status with: gitc"
echo "Stage and commit all changes with: gitc MESSAGE"
elif [ "$1" != "" ]; then
git pull --all
git add -A
git commit -m "$*"
git push --all
else
git pull --all
git status
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment