๐Ÿ“‚ DevOps

[Git] Git branch

dhyuck 2021. 9. 2. 22:40
๋ฐ˜์‘ํ˜•

  • ๊นƒ ๋ธŒ๋žœ์น˜ ํ™•์ธ (git branch)

      git branch 
      # '*'์€ ํ˜„์žฌ ์„ ํƒ๋œ ๋ธŒ๋žœ์น˜
  • ๊นƒ ๋ธŒ๋žœ์น˜ ๋งŒ๋“ค๊ธฐ ๋ฐ ์‚ญ์ œํ•˜๊ธฐ (git branch {branchname})

      git branch [OPTIONS] {branchname}
    
      # -d, --delete : ์‚ญ์ œ
    
      # ex) DEV ๋ธŒ๋žœ์น˜ ๋งŒ๋“ค๊ธฐ
      git branch DEV
    
      # ex) DEV ๋ธŒ๋žœ์น˜ ์‚ญ์ œ
      git branch -d DEV
  • ๊นƒ ๋ธŒ๋žœ์น˜ ๋ณ€๊ฒฝ (git checkout {branchname})

      git checkout [OPTIONS] {branchname}
    
      # ex) DEV ๋ธŒ๋žœ์น˜๋กœ ๋ณ€๊ฒฝ
      git checkout DEV
๋ฐ˜์‘ํ˜•

'๐Ÿ“‚ DevOps' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

[DevOps] CI/CD๋ž€?  (0) 2022.04.04