Last active
August 3, 2020 20:43
-
-
Save aayushjain/c259960320e2d3c7a78804c62670f233 to your computer and use it in GitHub Desktop.
Useful aliases to integrate in your workflow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
name = Aayush Jain | |
email = aayush.2896@gmail.com | |
[core] | |
editor = 'C:/Program Files/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin | |
pager = less | |
[alias] | |
st = status | |
a = add | |
c = commit | |
ac = !git a . && git c | |
dd = diff --staged #detailed diff | |
ec = !git a . && git c --allow-empty #emergency commit | |
ep = !git ec && git po #master #emergency push, mention <branch> | |
ua = reset HEAD #mention <file> to unstage | |
pom = push origin master | |
po = push origin #push <branch> to origin | |
dbo = push origin --delete #delete <branch> from origin | |
lg = log --graph --abbrev-commit --decorate --date=relative | |
nb = branch #new <branch> | |
mb = checkout #move to <branch> | |
b = checkout -b #create and move to <branch> | |
lb = branch -a #list all branches | |
db = branch -d #delete <branch> | |
wb = !git stash && git b #move staged files from wrong branch to new <branch>, then stash pop | |
done = "!f() { git checkout master && git branch -d @{-1}; }; f" | |
redo = commit --amend -C HEAD #first add the missed out files to staging, then run redo | |
undo = reset --hard HEAD^ #delete previous commit | |
stage = add | |
unstage = reset HEAD | |
untrack = git rm --cached |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment