[CICD] Github

MeltingOlafΒ·2022λ…„ 5μ›” 31일
0

CICD

λͺ©λ‘ 보기
1/1

βœ”οΈ Git

μ €μž₯μ†Œ λ§Œλ“€κΈ°

버전관리λ₯Ό ν•˜μ§€ μ•ŠλŠ” 둜컬 디렉토리

$ mkdir mygit
$ cd mygit
$ git init

κΈ°μ‘΄ Git μ €μž₯μ†Œ 클둠

$ git clone <URL>

βœ”οΈ Git ν”„λ‘œμ νŠΈμ˜ μ„Έ κ°€μ§€ μƒνƒœ

βœ”οΈ 파일의 생λͺ…μ£ΌκΈ°

μƒνƒœ 확인

$ git status

μŠ€ν…Œμ΄μ§•

$ git add <FILE>
$ git add .

.gitignore 파일

  • 아무것도 μ—†λŠ” λΌμΈμ΄λ‚˜, #둜 μ‹œμž‘ν•˜λŠ” 라인은 λ¬΄μ‹œν•œλ‹€.
  • ν‘œμ€€ Glob νŒ¨ν„΄μ„ μ‚¬μš©ν•œλ‹€. μ΄λŠ” ν”„λ‘œμ νŠΈ 전체에 μ μš©λœλ‹€.
  • μŠ¬λž˜μ‹œ(/)둜 μ‹œμž‘ν•˜λ©΄ ν•˜μœ„ 디렉토리에 μ μš©λ˜μ§€(Recursivity) μ•ŠλŠ”λ‹€.
  • λ””λ ‰ν† λ¦¬λŠ” μŠ¬λž˜μ‹œ(/)λ₯Ό 끝에 μ‚¬μš©ν•˜λŠ” κ²ƒμœΌλ‘œ ν‘œν˜„ν•œλ‹€.
  • λŠλ‚Œν‘œ(!)둜 μ‹œμž‘ν•˜λŠ” νŒ¨ν„΄μ˜ νŒŒμΌμ€ λ¬΄μ‹œν•˜μ§€ μ•ŠλŠ”λ‹€.

Staged와 Unstaged μƒνƒœ λ³€κ²½ λ‚΄μš© 보기
staged μƒνƒœκ°€ μ•„λ‹Œ 파일 비ꡐ

$ git diff

컀밋과 staged μƒνƒœ 비ꡐ

$ git diff --staged

변경사항 컀밋(버저닝, μŠ€λƒ…μƒ·)

$ git commit

κΈ°λ³Έ 에디터 λ³€κ²½
git config --global core.editor <EDITOR>

인라인 λ©”μ‹œμ§€

$ git commit -m <MESSAGE>

μŠ€ν…Œμ΄μ§• 및 인라인 λ©”μ‹œμ§€

$ git commit -a -m <MESSAGE>

쒋은 Commit λ©”μ‹œμ§€

https://gist.github.com/robertpainsi/b632364184e70900af4ab688decf6f53

파일 μ‚­μ œ

$ rm <FILE>

μ‚­μ œν•œ 파일 Staged μƒνƒœ

$ git rm <FILE>

파일λͺ… λ³€κ²½

$ git mv <ORGION> <NEWFILE>

컀밋 νžˆμŠ€ν† λ¦¬/둜그

$ git log

둜그 좜λ ₯ λ³€κ²½
git config --global core.pager 'less'
git config --global core.pager ''

$ git log --oneline
profile
How R U Today :)

0개의 λŒ“κΈ€