ã¯ããã¦ã®pull request - ãªã¢ã¼ããã©ã³ãã®master ãããªããã©ã³ãã«pull request
githubã§ã¯ããã¦pull request ãããã®ã§ããããã®æèºããã¨ããã¨ãæ¸ãã¦ããããã¨æãã¾ãã
masterãã©ã³ãã¸ã®pull requestã¯GitHubへpull requestする際のベストプラクティス - hnwの日記ã«ããã¾ã¨ã¾ã£ã¦ããã®ã§ãåèã«ãªãã¾ããã
pull request ããã¨ãã¯å¿ ãforkããèªåã®ã¬ãã¸ããªã«å¯¾ãã¦æä½ããã¾ãããï¼
forkããèªåã®ãªãã¸ããªãcloneãã
$ git clone https://github.com/kmn/tonicdnscli.git
forkå ãªãã¸ããª(https://github.com/mkouhei/tonicdnscli.git) *1ãupstreamã¨ããåã§ç»é²ããã
$ git remote add upstream https://github.com/mkouhei/tonicdnscli.git
ãªã¢ã¼ãã¬ãã¸ããªã確èªãã¾ãã
$ git remote -v origin [email protected]:kmn/tonicdnscli.git (fetch) origin [email protected]:kmn/tonicdnscli.git (push) upstream https://github.com/mkouhei/tonicdnscli.git (fetch) upstream https://github.com/mkouhei/tonicdnscli.git (push)
git clone ãããã®ã¯ "origin"ã¨ãã¦ç»é²ããã¾ãã
upstreamã¨ããååãç»é²ããã¦ãããã¨ã確èªã§ãã¾ãã
ãã©ã³ãã確èªãã¾ãã
% git branch -a * master remotes/origin/HEAD -> origin/master remotes/origin/devel remotes/origin/master remotes/origin/refactoring remotes/origin/unittest remotes/upstream/devel remotes/upstream/master remotes/upstream/unittest
git branch -l ã ã¨ãã¼ã«ã«ãªãã¸ããªã ãè¦ããã¨ãã§ãã¾ãã
ãªã¢ã¼ãã¬ãã¸ããª(upstream)ã®develãã©ã³ããã³ãã¼ãã¦ãã¼ã«ã«ãã©ã³ã local_develãä½æã,local_develã«ãã¤ãã
$ git checkout -b local_devel upstream/devel
説æãé·ãã§ãããã§ããã§ãããããããã¨ãªãã§ãã
ãã¼ã«ã«ãã©ã³ã(local_devel) ããªã¢ã¼ããªãã¸ããª(origin)ã®devel ãã©ã³ãã«push ããã
$ git push origin local_devel:devel
ããã·ã¥ããã³ããããgithubä¸ããpull request ãã¾ãã
åè
EZ-NET 特集: リモートブランチを操作する - Git による版管理環境を構築する
Git Workflow · NancyFx/Nancy Wiki · GitHub
GitHubへpull requestする際のベストプラクティス - hnwの日記
*1:ä»åpull request ããããã¸ã§ã¯ãã§ãããã©ã³ããè¤æ°ããä¾ã¨ãã¦ä½¿ããã¦ããã ãã¾ããã