ãã¼ã«ã«ä½æ¥ã§ã®gitãªãã¸ããªç®¡çã¨ã³ã¼ãã£ã³ã°ç°å¢ã®è©±
gitãæ¹ãã¦ã¡ããã¨ä½¿ããã¨ãã人ãã¾ããã§å¢ãã¦ããã®ã§ã¡ã¢ã¨ãã¦è²¼ã£ã¦ããã
ç¾ç¶ã®è¨å®ã¯ãããªæãã1å¹´ãããå¤ãã£ã¦ãªãã£ãã
https://github.com/suzuken/dotfiles/blob/cbf8e7168c96029d535d69f981337d23aacfa51c/gitconfig
ç¹ã«aliasã¾ããã¯æ®æ®µã¤ãã£ã¦ããã®ã§ããã¦ããã
[alias] # http://oli.jp/2012/git-powerup/ # http://blog.blindgaenger.net/advanced_git_aliases.html alias = !git config --list | grep 'alias\\.' | sed 's/alias\\.\\([^=]*\\)=\\(.*\\)/\\1\\\t => \\2/' | sort b = branch -a br = browse-remote ci = commit co = checkout current-branch = rev-parse --abbrev-ref HEAD d = diff dc = diff --cached di = diff dic = diff --cached f = fetch --prune fs = !git f && git su ignore = !([ ! -e .gitignore ] && touch .gitignore) | echo $1 >> .gitignore info = remote show origin l = log --graph -n 20 --pretty=format:'%C(yellow)%h%C(cyan)%d%Creset %s %C(green)- %an, %cr%Creset' ll = log --stat --abbrev-commit ln = log --graph -n 20 --pretty=format:'%C(yellow)%h%C(cyan)%d%Creset %s %C(green)- %an, %cr%Creset' --name-status lp = log --oneline -n 20 -p ls = log --stat --abbrev-commit -n 1 # display previous log s = status --short --branch st = status su = submodule update delete-merged-branches = !git branch --merged | grep -v \\* | xargs -I % git branch -d % fetch-pulls = fetch origin +refs/pull/*:refs/remotes/pull/*
ç¹ã«ãã使ãã®ã¯ delete-merged-branches
㨠fetch-pulls
ãremoteã§branchããã¼ã¸ããã¦fetchãã¦ããã¨ãã«æ¢ã«mergeãã¦ããã®ã ãã©localãã©ã³ãããæ¶ãããããããã¨ç¾å¨mergeããã¦ããªããã©ã³ãã®ã¿ãæ®ãã®ã§ä¾¿å©ã fetch-pulls
ã¯codeãã¬ãã¥ã¼ããã¨ãã¨ãã«ã¤ãã£ã¦ãã¦ããããã¤ããã¨å¯¾è±¡ããã¸ã§ã¯ãã®Pull Requestãã¾ã¨ãã¦fetchã§ãããããã¨ãã¼ã«ã«ã§diffãã¨ããããã便å©ã
ãã¨ã¯ãã¼ã¸ã«ã¯vimdiffã使ã£ã¦ãããã㨠git clone
㯠ghq clone
motemen/ghq ã§ã¤ãã£ã¦ãã¦ãå
¨é¨GOPATHã£ã½ãå
¥ãããã«ãªã£ã¦ããããã peco
peco/peco ã§æ¢ãããã«ãã¦ããã®ã§ã大åãã¼ã«ã«ã§ã®ãªãã¸ããªã®ç§»åã楽ã«ãªã£ããæ®æ®µã¯vimã§ã³ã¼ãã£ã³ã°ãã¦ããã®ã§ mattn/ctrlp-ghq ã§ããã¸ã§ã¯ããè¡ã£ããæ¥ãããã¦ãããã ãããæ°ããtabéã㦠ctrlp-ghq
ã§current directoryã移åã㦠Dirvish
justinmk/vim-dirvish ã§ããã®rootãéããã¨ãããã¨ããã¦ããã¨ãå¤ããåºæ¬çã«å
¨é¨åä½ã軽ãã®ãé¸ã¶ããã«ãã¦ãã
æ°ãä»ãã¨vimã®è©±ã«ãªã£ã¦ãã¾ã£ãã®ã§åçãã¦ããã