Sourcetree

reset --hard

  • ๋Œ์•„๊ฐ€๊ณ  ์‹ถ์€ ๋ฒ„์ „์„ ์šฐํด๋ฆญํ•˜์—ฌ, reset -> hard ํ•˜๋ฉด ๋œ๋‹ค.

revert

  • git revert๋Š” ์†Œ์ŠคํŠธ๋ฆฌ์—์„œ๋Š” reverse commit์ด๋‹ค.

  • ํ˜„์žฌ ๋ฒ„์ „์—์„œ ๋Œ์•„๊ฐ€๊ณ  ์‹ถ์€ ๋ฒ„์ „๊นŒ์ง€, ์ฐจ๋ก€๋กœ reverse commit์„ ํด๋ฆญํ•ด์ค€๋‹ค.

git head

  • ํŠน์ • ๋ฒ„์ „์„ ๋”๋ธ” ํด๋ฆญํ•˜๋ฉด ๋œ๋‹ค.

  • ์›๋ž˜ ์ƒํƒœ๋กœ ๋Œ์•„์˜ฌ ๋• ์ขŒ์ธกmaster ๋ฅผ ๋”๋ธ”ํด๋ฆญํ•˜์ž.

Copy SHA to Clipboard

  • ์ปค๋ฐ‹ ์•„์ด๋””๋ฅผ ํด๋ฆฝ๋ณด๋“œ์— ์ €์žฅํ•œ๋‹ค.

Last updated