Skip to content

amitjambusaria/quick_git

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Quick Git

Makes the most common Git workflow really easy. Add, commit and push in one simple command.

Install the script (link it to local bin folder):

$ git clone https://github.com/anshdivu/quick_git.git
$ cd quick_git
$ ln -s $PWD/quick_git /usr/local/bin/qg

Usage Example:

  • My Favorite combination:

    $ qg -apo "Awesome Commit"

    This command would internally execute:

    $ git add -A .
    $ git commit -v -m "Awesome Commit"
    $ git push origin CURRENT_BRANCH
    $ echo "commit_url" | pbcopy     # OS X only - copies to clipboard
    $ open "commit_url"              # OS X only - opens in web browser
  • Use '-h' or '--help' to get help manual

    $ qg -h
    #### or ####
    $ qg --help
    Usage: qg "commit message"
        -a, --all                        automatically stage files that have been modified, added or deleted
        -h, --help                       Prints help message
        -m, --message=<msg>              Uses the given <msg> as the commit message. Uses '<prefix>-<number> <msg>' as the commit message format
        -n, --number=<number>            Uses the given <number> as part of the commit message. The commit message format will be '<prefix>-<number> <msg>'
        -o, --open                       (OS X only) Opens commit url in browser and copies the url to clipboard
        -p, --push                       Push commits to remote
        -r, --prefix=<prefix>            Uses the given <prefix> as part of the commit message. The commit message format will be '<prefix>-<NUMBER> <msg>'

(Optional) Commit message Formating based on Branch Name:

  • Assuming you are working in branch "ISSUE-NUM-my-branch"

    $ qg "Easy Commit"

    This command would internally execute:

    $ git commit -v -m "ISSUE-NUM Easy Commit"
  • Assuming you are working in branch "123-my-branch" and the repo url is "https://github.com/MyOrg/MyRepo"

    $ qg "Easy Commit"

    This command would internally execute:

    $ git commit -v -m "MyOrg-123 Easy Commit"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages