Skip to content

Instantly share code, notes, and snippets.

@krainboltgreene
Created January 30, 2012 20:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krainboltgreene/1706337 to your computer and use it in GitHub Desktop.
Save krainboltgreene/1706337 to your computer and use it in GitHub Desktop.
# `git init` or `git clone`, depending on if the url is provided
$ gim c[reate] repo[sitory] [url]
# Completely removes the .git directory
$ gim d[elete] repo[sitory]
# Creates a branch and switches to that branch.
$ gim c[reate] br[anch] [name] [--from=|-f base]
# Deletes a branch, with a warning if it's not merged in.
# If you add the --remote flag, it'll also delete the remote version
$ gim d[elete] br[anch] [name] [--remote=|-r remotename]
# Just adds the message field for `git stash`
# The `un` prefix drops the stash onto the current branch
$ gim [un]stash [glob|FILEs|DIRs] [--message|-m message]
# Adds a file change|removal|creation to the index
# If directory is given then it'll make a `.gitkeep` file and add that
# If `un` is prefixed, then it does the opposite (including removing the .gitkeep file for dir)
# You can also provide a range of lines to commit from the file (ie 120..150
$ gim [un]s[tage] [glob|FILEs|DIRs] [--line=|-l [start]..[end]]
# Just like `git commit`, however it catches you for config information if you haven't supplied it
$ gim c[commit] [glob|FILEs|DIRs] [--message=|-m message]
# A combination of stage + commit
$ gim save [glob|FILEs|DIRs] [--line=|-l [start]..[end]] [--message=|-m message]
# This command rolls back the changes made by the last commit and readies them to be committed
$ gim u[ndo] [commit|FILEs|DIRs]
# This is like undo, but more dangerous as it throws away changes made.
$ gim rewind [count]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment