Git Extras Cheat Sheet

From WikiOD

Here is the cheatsheat of Git Extras and basic guide on how to use Git Extras

References[edit | edit source]

Git-flow[edit | edit source]

$ git feature myfeature
  switched to branch 'feature/rofl'

$ ...
$ git checkout develop
$ git feature finish myfeature
  merging 'feature/rofl' into develop
  deleted branch 'feature/rofl'

Also git-bug and git-refactor.

Branches[edit | edit source]

$ git delete-merged-branches
  # hint: do `git remote prune origin` after

$ git create-branch development
$ git delete-branch development

$ git fresh-branch gh-pages

Inspecting[edit | edit source]

$ git summary   # repo age, commits, active days, etc
$ git impact    # impact graph
$ git effort    # commits per file

Github[edit | edit source]

$ git fork strongloop/express
# sync your fork with the original repository:
$ git remote add upstream
$ git fetch upstream; git merge upstream/master

Tags[edit | edit source]

$ git release v1.0.0           # commit, tag, push-tags
$ git delete-tag v1.0.0

Conveniences[edit | edit source]

$ git ignore "*.log"

Locking[edit | edit source]

Assumes that changes will not be committed.

$ git lock config/database.yml
$ git unlock config/database.yml

Etc[edit | edit source]

$ git obliterate secret.yml   # remove all references to it

References[edit | edit source]