lost of really funny & amazing git aliases + lsa for ls -a shell alias
authorpatrick nsukami <ndkpatt@gmail.com>
Sat, 20 Dec 2014 01:51:21 +0000 (01:51 +0000)
committerpatrick nsukami <ndkpatt@gmail.com>
Sat, 20 Dec 2014 01:51:21 +0000 (01:51 +0000)
.bash_aliases
.gitconfig

index 9dbf0dd..7426a91 100644 (file)
@@ -58,7 +58,7 @@ alias ls='ls --hide="*~" --color'
 alias dir='dir --color=auto'
 alias vdir='vdir --color=auto'
 alias ll='ls -lh'
-alias la='ls -lah'
+alias lsa='ls -lah'
 
 # some more mor aliases
 alias aptitude="sudo aptitude"
index 96414e0..db2ffe8 100644 (file)
@@ -8,40 +8,65 @@
         autocrlf = input
 
 [alias]
-        changes-pulled = !git log -p -2
-        not-yet-pulled = !git log --name-status origin/master
         aliases = !git config --get-regexp 'alias.*' | colrm 1 6 | sed 's/[ ]/ = /'
-        lastco = log -1 HEAD
-        list-assumed-unchanged = !git ls-files -v | grep "^[[:lower:]]"
+
+        pulled-changes = !git log -p -2
+        not-yet-pulled = !git log --name-status origin/master
+        lastco = log -1 HEAD --numstat
+
         lol = log --graph --decorate --pretty=oneline --abbrev-commit
         lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
         lg1 = log --graph --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(bold white)— %an%C(reset)%C(bold yellow)%d%C(reset)' --abbrev-commit --date=relative
         lg2 = log --graph --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n''          %C(white)%s%C(reset) %C(bold white)— %an%C(reset)' --abbrev-commit
         lg = !"git lg1"
+
         undo-commit = reset --soft HEAD^
-        create-branch-from-stash = !git stash branch
         undo-add = reset HEAD
         undo-modif = checkout
-        assume-unchanged = update-index --assume-unchanged
-        no-more-assume-unchanged = update-index --no-assume-unchanged
-        #list-files-assumed-unchanged = ls-files -v | grep "^[^H]"
-        delete-local-branch = branch -d
+
+        assume-unch = update-index --assume-unchanged
+        unassume-unch = update-index --no-assume-unchanged
+        list-assumed-unch = !git ls-files -v | grep "^[[:lower:]]"
+        unassumeall = "!git assumed | xargs git update-index --no-assume-unchanged"
+        assumeall = "!git st -s | awk {'print $2'} | xargs git assume-unch"
+
+        create-branch-from-stash = !git stash branch
         create-branch = checkout -b
+        rename-branch = branch -m
         goto-branch = checkout
+        delete-local-branch = branch -d
+
         fix-latest-commit = commit --amend
-        rename-branch = branch -m
+        panic = !tar cvf ../git_panic.tar *
+
+        cl = clone
+        br = branch
         ch = checkout
         co = commit
         st = status
         br = branch
+        dc = diff --cached
+
         hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
         type = cat-file -t
         dump = cat-file -p
         stash = stash save -u # stash even the untracked files, and add a clear message
-        dc = diff --cached
-        compactlog = log --pretty=format:"%h%x09%an%x09%ad%x09%s" --date=short
-        ls = ls-files
 
+        compactlog = log --pretty=format:"%Cgreen%h%Creset%x09%Cred%an%Creset%x09%ad%x09%s" --date=short
+        ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
+        ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
+        ld = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=relative
+        log-diffs = log -u
+        log-me    = !UN=$(git config user.name)&& git ld --author="\"$UN\""
+
+        filepath = "!git ls-files | grep -i"
+
+        r = reset
+        r1 = reset HEAD^
+        r2 = reset HEAD^^
+        rh = reset --hard
+        rh1 = reset HEAD^ --hard
+        rh2 = reset HEAD^^ --hard
 
 [color]
         ui = always