Created
September 6, 2024 00:06
-
-
Save underground/3c839cf030231fb20c210fcd48a830de to your computer and use it in GitHub Desktop.
This file contains hidden or 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
[alias] | |
stage = add | |
unstage = reset HEAD | |
co = checkout | |
clean = clean -df # clean -n で事前チェックできる | |
st = status --short --branch | |
sh = show | |
df = diff | |
v = branch -vv | |
o = remote show origin | |
ft = fetch | |
rename = branch -m # git branch -m OLD_NAME NEW_NAME | |
up = pull --rebase # pull rebase | |
ci = commit -a # modifiedなファイルを全てstageへ | |
cam = commit -a --amend # 直前のcommitを修正 | |
pick = cherry-pick | |
br = branch --sort=-committerdate | |
ba = branch --sort=-committerdate -a # originも含めた全てのbranchを表示 | |
bm = branch --sort=-committerdate --merged # merge済みのbranchを表示 | |
bn = branch --sort=-committerdate --no-merged # mergeしてないbranchを表示 | |
select = !sh -c \"git checkout $(git branch --sort=-committerdate --list --no-color | colrm 2 2 | peco)\" | |
rv = reset --soft # rv commitID で特定のコミットまで戻す | |
rv-old = reset --hard # rv-old commitID で特定のコミットまで戻す | |
rv-master = reset --hard origin/master # リモートの状態に戻す | |
wc = whatchanged # logに変更されたファイルも一緒に出す | |
ls = log --stat # logに変更されたファイルも一緒に出す | |
lp = log -p # diffも一緒に出す | |
la = log --pretty=\"format:%ad %h (%an): %s\" --date=short # ざっくりログ出す | |
lr = log origin # originのlog | |
oneline = log --pretty=oneline | |
search = log --pretty=oneline | grep | |
ranking = shortlog -s -n --no-merges | |
logs = log --all --decorate --oneline --graph --date=short --format='%C(yellow)%h%C(reset) %C(magenta)[%ad]%C(cyan)@%an%C(reset)%C(reset)%C(auto)%d%C(reset) %s' -1000 | |
alllogs = log --all --decorate --oneline --graph --date=short --format='%C(yellow)%h%C(reset) %C(magenta)[%ad]%C(cyan)@%an%C(reset)%C(reset)%C(auto)%d%C(reset) %s' | |
replace-author = filter-branch -f --env-filter "GIT_AUTHOR_NAME='NXN'; GIT_AUTHOR_EMAIL='[email protected]'; GIT_COMMITTER_NAME='NXN'; GIT_COMMITTER_EMAIL='[email protected]';" HEAD | |
dm = diff master # masterとのdiff | |
dw = diff --color-words # 単語単位でいろつけてdiff | |
dc = diff --cached # addされているものとのdiff | |
ds = diff --staged # 同上(1.6.1移行) | |
d1 = diff HEAD~ # HEADから1つ前とdiff | |
d2 = diff HEAD~~ # HEADから2つ前とdiff | |
d3 = diff HEAD~~~ # HEADから3つ前とdiff | |
d4 = diff HEAD~~~~ # HEADから4つ前とdiff | |
d5 = diff HEAD~~~~~ # HEADから5つ前とdiff | |
d10 = diff HEAD~~~~~~~~~~ # HEADから10前とdiff | |
patch = diff --no-prefix # create patch file. e.g.git diff --no-prefix > diff.patch | |
pull-tags = fetch --all --tags && git ls-remote --tags origin | |
push-tags = push origin --tags | |
touch = commit --amend -C head --date=now | |
redate = git-redate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment