Giter Site home page Giter Site logo

gg's Introduction

gg

the cookbook of git goodies

status log

gg helps you work with git more efficiently, saving you keystrokes for your most prized projects.

Think of gg as a wrapper for the git commands that you run all the time.

Getting Started

After the super painless installation, suppose we want to clone the awesome spark shell script (created by Zach Holman). status FOSSA Status Alright, let's switch into that directory. gettingstarted2 After making a quick change, let's check the status of our clone. gettingstarted3 Looks like we haven't staged our changes.

In the standard git workflow, we would have to git add -A and then git commit -m "Updated example in README.".

With gg, we can simply gg c Updated example in README. and we're good to go. gettingstarted4 Let's check our clone's status again. gettingstarted5 Looking good!

Installation

gg can be installed via the Node Package Manager (npm).

	$ npm install -g gitgoodies

If that doesn't work, try running it as root. $ sudo npm install -g gitgoodies

You can also get up and running without npm, but it is not recommended to do so.

	# Clone the repository.
	$ git clone https://github.com/qw3rtman/gg.git

	# Switch into the repository's directory.
	$ cd gg

	# Install!
	$ npm install -g

	# Install as root, if the above command does not work.
	$ sudo npm install -g

gg relies on Node.js and git.

Don't foget to alias gg='noglob gg' (alias gg to noglob gg) if you're using prezto, oh-my-zsh, or something similar.

As the standard git plugin for oh-my-zsh already has uses gg as an alias for git gui citool, I recommend either unaliasing the oh-my-zsh plugin alias if you don't use it by placing unalias gg at the end of ~/.oh-my-zsh/plugins/git/git.plugin.zsh, or aliasing gg with a different alias, such as ggg.

Updating

Changes are published to the npm package, which is kept up-to-date with this GitHub repository. Simply update via npm:

	# Update gg
	$ npm update -g gitgoodies

Usage

Initializing repositories

initialize

  • gg i
  • gg init
  • gg initialize

Cloning repositories

clone

  • gg cl
  • gg clone

Adding changes

add Specify which files to add.

  • gg a
  • gg add

Add all files.

  • gg aa

Committing changes

commit

  • gg c
  • gg ci
  • gg commit

Pushing commits

push

  • gg p
  • gg push

Pulling commits

pull

  • gg pl
  • gg pull

Fetching commits

fetch

  • gg f
  • gg fetch

Fetch all (git fetch -all)

  • gg fa

Viewing status

status

  • gg s
  • gg st
  • gg status

Viewing log

log

  • gg l
  • gg log

Contributing

Contributions are always welcome.

We follow Airbnb's coding standard, so make sure you use that as a guideline.

Fork our code, make a new branch, and send a pull request.

TODO:

  • support for branches
  • handling for non-fast-forwards (when you need to pull first, merge, and then push)
  • handling for merge conflicts
  • handling for freshly initialized git repositories status
  • support for specifying path of repository initialization and cloning
  • unit tests
  • custom routines

License

FOSSA Status

gg's People

Contributors

fossabot avatar qw3rtman avatar

Watchers

 avatar  avatar

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.