Kaynağa Gözat

Update git aliases.

master
Mitch Tishmack 10 yıl önce
ebeveyn
işleme
16ed3393e2
1 değiştirilmiş dosya ile 8 ekleme ve 3 silme
  1. +8
    -3
      git.org

+ 8
- 3
git.org Dosyayı Görüntüle

@@ -45,7 +45,7 @@ General git configuration split out into sections mostly.
wd = diff --color-words
fa = fetch --all
ci = commit
ciu = commit --all
cia = commit --all
co = checkout
ds = diff --stat
ba = branch --all
@@ -61,6 +61,7 @@ General git configuration split out into sections mostly.
ri = rebase --interactive --autosquash
ra = rebase --abort
effit = reset --hard
bn = rev-parse --abbrev-ref HEAD
cp = log --no-merges --cherry --graph --oneline
# What commits differ between branches, note, equivalent commits are omitted.
# Use this with three dot operator aka master...origin/master
@@ -68,14 +69,18 @@ General git configuration split out into sections mostly.
# Same as ^ only equivalent commits are listed with a = sign.
cmd = log --no-merges --left-right --graph --cherry-mark --oneline
# git update with submodule update
sup = git pull --rebase && git submodule update --init --recursive
sup = !git pull --rebase && git submodule update --init --recursive
# git clone with submodules
sc = !git clone --recursive $1
# what files are getting updated a lot
churn = !git log --all -M -C --name-only --format='format:' "$@" | sort | grep -v '^$' | uniq -c | sort | awk 'BEGIN {print "count,file"} {print $1 "," $2}'
# help the gc a bit and get a bit more space back for a local clone
trim = !git reflog expire --expire=now --all && git gc --prune=now
aliases = !git config --list | grep 'alias\\.' | sed 's/alias\\.\\([^=]*\\)=\\(.*\\)/\\1\\ \t => \\2/' | sort
defremote = !git branch -rvv | egrep 'HEAD' | awk '{print $1}' | sed -e 's|/HEAD||g'
short = rev-parse --short
find-merge = !sh -c "commit=$0 && branch=${1:-HEAD} && (git rev-list $commit..$branch --ancestry-path | cat -n; git rev-list $commit..$branch --first-parent | cat -n) | sort -k2 | uniq -f1 -d | sort -n | tail -1 | cut -f2"
show-merge = !sh -c "merge=$(git find-merge $0 $1) && [ -n \"$merge\" ] && git show $merge"
pbr = !git push --set-upstream $(git defremote) $(git bnam)
#+END_SRC
** github
#+BEGIN_SRC conf :tangle (when (eq git-p t) "tmp/.gitconfig")


Yükleniyor…
İptal
Kaydet