Skip to content

Instantly share code, notes, and snippets.

@ArnaudRinquin
Last active April 22, 2016 00:01
Show Gist options
  • Save ArnaudRinquin/493021d25f4cafbdf396 to your computer and use it in GitHub Desktop.
Save ArnaudRinquin/493021d25f4cafbdf396 to your computer and use it in GitHub Desktop.
Git + Oh-My-Zsh = ❤

gap: git add -p for patch mode.

diff --git a
/gulpfile.js b/gulpfile.js
index 61d4a62..0e626f7 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -7,7 +7,7 @@ require('coffee-script').register();
 // * basics libs
 global.gulp = require('gulp');
 global.gutil = require('gulp-util');
-global.path = require('path');
+// global.path = require('path');
 global._ = require('lodash');
 global.notify = require('gulp-notify');
 global.watch = require('gulp-watch');
Stage this hunk [y,n,q,a,d,/,e,?]?
g=git
ga='git add'
gap='git add --patch'
gb='git branch'
gc='git commit -v'
'gc!'='git commit -v --amend'
gca='git commit -v -a'
'gca!'='git commit -v -a --amend'
gcm='git checkout master'
gco='git checkout'
gd='git diff'
ggpull='git pull origin $(current_branch)'
ggpur='git pull --rebase origin $(current_branch)'
ggpush='git push origin $(current_branch)'
ggshoot='ggpush --delete'
glog='git log --oneline --decorate --color --graph'
grba='git rebase --abort'
grbc='git rebase --continue'
grbi='git rebase -i'
gst='git status -sb'

grbi: git rebase -i

git rebase -i HEAD~3 will open a text editor where you can pick, squash and reorder commits:

pick 134afdd AutoExpire: only set autoWithdrawDate, autoDeleteDate when it's being published the first time
pick b6e8306 translations-docs: added web-hooks section
pick a5f8fd3 DEV-4955 Fixed routing for live presentation

# Rebase a3d66cc..a5f8fd3 onto a3d66cc (3 command(s))
#
# Commands:
# p, pick = use commit
# r, reword = use commit, but edit the commit message
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
# f, fixup = like "squash", but discard this commit's log message
# x, exec = run command (the rest of the line) using shell
#
# These lines can be re-ordered; they are executed from top to bottom.
#
# If you remove a line here THAT COMMIT WILL BE LOST.
#
# However, if you remove everything, the rebase will be aborted.
#
# Note that empty commits are commented out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment