- å ãã¿
- .gitconfig
- 使ãæ¹
- 使ã£ãå³
- ããã¾ãã.gitconfig ã® aliasã§ç»é²ããã³ãã³ãããå¼æ°ãåå¾ããæ¹æ³
å ãã¿
便å©ãªãã§ããã³ãã³ãé·ããã¦è¦ããããªãã®ã§aliasã«ãã¾ãã
.gitconfig
[alias] fpr = "!f() { git fetch origin pull/$1/head:pr/$1; }; f"
ã³ãã³ãåãæ°ã«ãªã人ã¯é©å®å¤ãã¦ãã ãã
使ãæ¹
git fpr <PullRequest ID>
㧠pr/<PullRequest ID>
ã«branchãä½ããã¾ã
使ã£ãå³
[[email protected]] â ~/workspace/github.com/sue445/chrome-gitlab-notifier (master) [[email protected]] [03-31 16:01:18] $ g fpr 83 remote: Counting objects: 14, done. remote: Compressing objects: 100% (14/14), done. remote: Total 14 (delta 4), reused 0 (delta 0), pack-reused 0 Unpacking objects: 100% (14/14), done. From github.com:sue445/chrome-gitlab-notifier * [new ref] refs/pull/83/head -> pr/83 [[email protected]] â ~/workspace/github.com/sue445/chrome-gitlab-notifier (master) [[email protected]] [03-31 16:02:18] $ g co pr/83 Switched to branch 'pr/83' [[email protected]] â ~/workspace/github.com/sue445/chrome-gitlab-notifier (pr/83) [[email protected]] [03-31 16:02:46] $
ããã¾ãã.gitconfig ã® aliasã§ç»é²ããã³ãã³ãããå¼æ°ãåå¾ããæ¹æ³
ç´æ¥ $1
ã£ã¦æ¸ãã¨ãã¾ãåããªãã£ãã®ã§èª¿ã¹ããé¢æ°ã®ä¸ã«å
¥ããå¿
è¦ãããã£ã½ã