Rails Upgradeæ¥ãªã©ã§ä½¿ãã git command
git worktree
# git worktree add -b <branchå> <ãã£ã¬ã¯ããª> origin/master git worktree add -b rails6 app_rails_6 origin/master
ãã§ãã¯ã¢ã¦ããã¦ãããªãã¸ããªãããä»»æã®ãã©ã³ããå¥ã®ãã£ã¬ã¯ããªã«åãåºããæ©è½ã
Upgradeæ¥ã§ã¯ãä½æ¥ã«ãã£ã¦å
ã®ç¶æ
ã¨æåãå¤ãã£ã¦ããªããã確èªããªããç¶ãã¦ãå¿
è¦ããããmasterã¨upgradeç¨branchã®è¡ãæ¥ãé »ç¹ã«çºçããã
ããã git checkout ã«ãããã©ã³ãåãæ¿ãã§è¡ããã¨ããã¨ããã®ãã³ã«ä½æ¥éä¸ã®å¤æ´ãä»®ã³ããããããStashãããããå¿
è¦ãããããé常ã«æéã
ãã®æéãgit workflowã使ãã¨ä¸è¦ã«ãªã(ãã£ã¬ã¯ããªç§»åã§æ¸ããã)
ãªã worktreeã§æå®ããã»ãã«ãã .gitãã¡ã¤ã«( ãã£ã¬ã¯ããªã§ã¯ãªã ) ãè¦ãã¨æ³åãã¤ããã.git/ ã¯å
ã®ãã£ã¬ã¯ããªã®ãã®ãåç
§ãã¦ããã
ãã®ããä½æ¥å®äºæã«worktreeãæ¶ããã¨ãã¦ãå
ã®ãã£ã¬ã¯ããªãæ¶ãã¦ãã¾ãã¨æ²æ¨ãªãã¨ã«ãªãã®ã§æ°ãã¤ãã¦ãã ããã
git branch --contain & git tag --contain
gemãå°å ¥ããã¨ãããã°èªä½ã¯ä¿®æ£ããã¦ãããã©æªãªãªã¼ã¹ã ã£ãããã¦ä¸ã®ããã«branchãtagãã¾ãã¯ãªãã¸ã§ã³ãç´æ¥æå®ãããã¨ãããã
gem 'hogehoge', git: 'https://github.com/ghost/hogehoge', branch: 'patch-1'
ãã®ã¾ã¾æéããã£ã¦ããå ´åãmasterã§å
¥ã£ãä¿®æ£ãªã©ãåãè¾¼ããªãããæ©ãã«ãªãªã¼ã¹ãã¼ã¸ã§ã³ãåç
§ããç¨ã«æ»ãããã
ãã¨ãã£ã¦ä¸æ°ã«ææ°ã«ä¸ãã¦ãã¾ãã¨ããã¹ããè½ã¡ãã¨ãã©ãã§è½ã¡ãããããããªããªã£ã¦ãã¾ãã
ãã®ããä¸åº¦ãä»ã¾ã§æå®ãã¦ããã³ããããå«ãæãå¤ããã¼ã¸ã§ã³ãã使ã£ã¦ä¸åº¦ç¢ºèªãã¦ããããã
ãããªã¨ãGemfile.lockã«æ¸ããã¦ãsha1ã使ã£ã¦ git branch --contain <sha1>
ã¾ã㯠git tag --contain <sha1>
ã使ãã¨ãã®ã³ããããå«ã¾ããbranchãtagãä¸è¦§åå¾ã§ããã
ããã使ãã¨ãGitHubåç
§ãå¤ãã¨ãã®åèã«ãªãã®ã§ãªã¹ã¹ã¡