Coder Social home page Coder Social logo

git-extend's Introduction

Useful scripts to extend git functionality.

Installation

Copy the main scripts into a directory named in $PATH.

cp -av git-* ~/bin/

Usage

  1. git-release # Like that from git-extras only more automatic
git release        # Creates a new semver release with an annotated tag
git release point  # Create a point release e.g. v0.1.0 -> v0.1.1
  1. git-changelog
git changelog              # List commit messages since last "tag"
git changelog HEAD~4 HEAD  # List commit messages between two revisions
  1. git-bar
source ~/bin/git-bar   # NOTE: This is not an executable script but a
                       # collection of bash aliases/functions.

gh          # list the help screen

Committing

gd file     # git diff file - file is now "remembered"
ga          # git add file  - NOTE file is not specified as it was remembered
gca My elaborate commit message   # Commit. NOTE no quotes needed.

gd .        # git diff .
gca My other well-formed commit message

gdc         # git diff --cached

Branches

gbr          # What branch am I on?
gb           # Use fzf to select branch
gco audit    # Checkout branch matching 'audit' anywhere in branch name
gco master   # Checkout master
gco          # Checkout last branch _a la_ cd

gba          # git branch --all --verbose

Syncing

gp          # git pull
gP          # git push
gPA         # git push --all --tags  # Useful after a release
gsync       # git fetch --all && git pull .. useful before merge/rebase
            #                                from other branches

Saving

gwip        # Create a WIP commit like a stash but pushable to remote
            # Useful before you go on vacation
gundo       # Undo the WIP commit (git reset --mixed HEAD~1)

gwipe       # Commit and then do a git reset --hard
            # Why? So you can always recover even this work via the reflog

... And many other goodies. Most commands support tab-completion too.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.