๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๊ฐœ๋ฐœ์ƒํ™œ/Git

[GIT] Reset ๋ช…๋ น์–ด

by cocococo331 2022. 3. 29.
  1. git reset –hard b1f78bc
    • ๋‹ค ๋‚ ๋ ค๋ฒ„๋ฆผ
  2. git reset –soft b1f78bc
    • ์ž‘์—… ์ด๋ ฅ ๋‹ค ๋ณด์กด ๋ฐ stage์— ๊ณ ๋Œ€๋กœ ์žˆ์Œ
  3. git reset –mixed b1f78bc (default)
    • ์ž‘์—… ์ด๋ ฅ ๋ณด์กด์ด๋‚˜ ์ปค๋ฐ‹์„ ์œ„ํ•ด ๋‹ค์‹œ ์ง€์ •ํ•ด์•ผํ•จ
  4. git reset HEAD~1 : ํ˜„์žฌ๋ถ€ํ„ฐ 1๊ฐœ ์ „