gitã§ã®branchéçº
æè¿branchãåãã¦éçºãããæ©ä¼ããã£ãã®ã§åå¿é²
1.ãã¼ã«ã«ã®ãã©ã³ããä½æãã
ãã¼ã«ã«ãã©ã³ãã®ç¢ºèª
# git branch * master
ãã¼ã«ã«ãã©ã³ããä½æãã
# git branch l_hoge
â»ç·¨éä¸ã®ãã®ï¼ã³ããããã¦ãªããã®ã¨ãï¼ã¯ãã¹ã¦ãã©ã³ãã«åæ ããã¾ã
# git branch * master l_hoge
2.ãªã¢ã¼ããã©ã³ãã®ä½æ
ãªã¢ã¼ããã©ã³ãã®ç¢ºèª
# git branch -r origin/HEAD -> origin/master origin/master
ãªã¢ã¼ããã©ã³ããä½æãã
# git push origin r_hoge
ãªã¢ã¼ããã©ã³ãã®å確èª
# git branch -r origin/HEAD -> origin/master origin/master origin/r_hoge
3.ãã¼ã«ã«ãã©ã³ãã«åãæ¿ãã
ãã¼ã«ã«ãã©ã³ãã®ç¢ºèª
# git branch * master l_hoge
ãã¼ã«ã«ãã©ã³ãä½æ
# git checkout l_hoge
ãã¼ã«ã«ãã©ã³ãã®å確èª
# git branch master * l_hoge
4.ãã¼ã«ã«ãã©ã³ããããªã¢ã¼ããã©ã³ãã«pushãã
# git commit -a -m 'test commit'
ãªã¢ã¼ããã©ã³ãã«push
# git push origin r_hoge
5.ä»ã®äººããªã¢ã¼ããã©ã³ãã使ç¨ãã
ãªã¢ã¼ããã©ã³ã確èª
# git branch -r origin/HEAD -> origin/master origin/master
originã®ãªã¢ã¼ããã©ã³ãã®æ å ±ãåæ
# git fetch origin
ãªã¢ã¼ããã©ã³ãå確èª
# git branch -r origin/HEAD -> origin/master origin/master origin/r_hoge
l_hogeã«ãªã¢ã¼ããã©ã³ãããã§ãã¯ã¢ã¦ã
# git checkout -b l_hoge origin/r_hoge
ãã¼ã«ã«ãã©ã³ã確èª
# git branch * master l_hoge
6.ãã¼ã«ã«ãã©ã³ãã«ãªã¢ã¼ããã©ã³ãããpullãã
# git pull origin r_hoge
6.masterã«ãã¼ã¸ãã
# git pull origin r_hoge
ã³ãã³ã
ãã¼ã«ã«ãã©ã³ãã®ç¢ºèª git branch ãªã¢ã¼ããã©ã³ãã®ç¢ºèª git branch -r ãã©ã³ãã®ç¢ºèª git branch -a ãã¼ã«ã«ãã©ã³ããä½æãã git branch l_hoge ãªã¢ã¼ããã©ã³ãã®ä½æ git push origin r_hoge ãã©ã³ãã®åãæ¿ã git checkout l_hoge git checkout master ãªã¢ã¼ããã©ã³ãã«ããã·ã¥ git push origin r_hoge ãªã¢ã¼ããã©ã³ããããã« git pull origin r_hoge ãªã¢ã¼ããããã§ãã¯ã¢ã¦ã git checkout -b l_hoge origin/r_hoge masterã§ãã¼ã¸ git pull origin r_hoge ãªã¢ã¼ãã§ã®ãã¼ã¸ git pull origin master