π Computer Science/Git
[Git] μ격μ μ₯μμ Push ν Commit μμ νκΈ°
ibelieveinme
2024. 2. 15. 14:21
728x90
1. μλ λͺ λ Ήμ΄λ₯Ό ν΅ν΄ μμ ν commit μ νμΈ.
git log |
2. κ°μ₯ λ§μ§λ§μ push ν(κ°μ₯ μμ μλ) commit μ μ§μ°κ³ μΆκΈ° λλ¬Έμ λ€μ λͺ λ Ήμ΄λ₯Ό μ¬μ©νμ¬ commit μ μμ νλ€.
git reset HEAD^ |
3. κ·Έλ¦¬κ³ λ΄κ° commit μ μ§μ λ€λ κ²μ github μλ²μ μλ €μ£Όμ΄ github λ΄μμλ ν΄λΉ commit μ μμ νλλ‘ νλ€.
git push -f origin "λΈλμΉλͺ " |
cf) master μμ push ν commit μ μμ νλ €λ©΄ git push -f origin master λ₯Ό μ λ ₯ν΄μ£Όλ©΄ λλ€.
728x90