Project

git-pc

0.0
No commit activity in last 3 years
No release in over 3 years
Sometimes execute the basic git commands is very boring and repetitive so, this shortcut will make your job most fast.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 1.2
= 2.5.0
 Project Readme

###Git shortcut to automate the commit and push commands

Sometimes executing basic git commands is very boring and repetitive so, this shortcut will help you a lot. It will run these commands in this sequence:

  • git status
  • git commit -S -am"YOUR_MESSAGE_COMMIT"
  • git push origin YOUR_CURRENT_BRANCH

The Script

#!/bin/bash

CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
COMMIT_MESSAGE=$1

echo -e "$(tput setaf 2)** Executing Status command$(tput sgr0)"
git status

echo -e "$(tput setaf 2)\n** Executing commit command$(tput sgr0)\n"
git commit -S -am"$COMMIT_MESSAGE"

echo -e "$(tput setaf 2)\n** Executing push command$(tput sgr0)\n\n"
git push origin $CURRENT_BRANCH

How to install:

Run this command line:

$ gem install git-pc

Usage:

Access some git repository and now you just run:

git pc 'Message Commit'