Sup νλ‘μ νΈλ₯Ό νλ μ€ κΈ°λ₯λ³λ‘ pr λΆλ¦¬λ₯Ό νμλ μκ²¬μ΄ λμλ€.
νμ§λ§ μ½λ μμ± ν λΈλ°μΉ λΆλ¦¬λ₯Ό νκ³ μ¬λ¦¬μ§ μμμ push ν κ±Έ λλλ¦¬λ €κ³ νλ€.
νλ¦°λνλλ° μμΌλ‘ λΆλ¦¬λ₯Ό μ±μ€νκ².. ν΄μΌκ² λ€.
reset λͺ λ Ήμ΄μ revert λͺ λ Ήμ΄κ° μλ€.
reset : μκ°μ μμ κ³Όκ±°μ νΉμ μ¬κ±΄(commit)μΌλ‘ λλλ¦°λ€.
revert : νμ¬μ μμΌλ©΄μ κ³Όκ±°μ νΉμ μ¬κ±΄(commit)λ€λ§ μλ μΌλ‘ λ§λ λ€.
λͺ λ Ήμ΄
git revert [commit ID]
commit ID μμλ΄λ λ²
git show λΈλμΉμ΄λ¦
git show νκ·Έμ΄λ¦
git show group
commit 3b3d84231b42a80495d7... (HEAD -> group, origin/group)
Author: haeburney <4ckdnjssu@naver.com>
Date: Mon Apr 15 23:14:33 2024 +0900
20240415 κΉνμ : νμ νν΄ λ° κ·Έλ£Ή λ§λ€κΈ°
diff --git a/Backend/src/main/java/com/example/studyproject/group/Group.java b/Backend/src/main/java/com/example/studyproject/group/Group.java
new file mode 100644
μμμ λμ commit ID : 3b3d84231b42a80495d7...
git revert 3b3d84231b42a80495d7
λ₯Ό μ λ ₯νλ©΄ λ°κ³Ό κ°μ editμ°½μ΄ λ¬λ€.
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
ndows
This reverts commit 3b3d84231b42a80495d7.
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch group
# Your branch is up to date with 'origin/group'.
#
# Changes to be committed:
# deleted: Backend/src/main/java/com/example/studyproject/group/Group.java
# modified: Backend/src/main/java/com/example/studyproject/member/MemberController.java
# modified: Backend/src/main/java/com/example/studyproject/member/MemberDao.java
# modified: Backend/src/main/java/com/example/studyproject/member/MemberService.java
# modified: Backend/src/main/resources/sqlMapper/member/MemberManage_SQL.xml
#
# Untracked files:
.git/COMMIT_EDITMSG [unix] (19:25 16/04/2024) 1,1 Top
1οΈβ£ i ν€λ₯Ό λλ¬ insert λͺ¨λλ‘ λ³κ²½
2οΈβ£ μνλ 컀λ°λ©μμ§ μ λ ₯
3οΈβ£ μ λ ₯ ν Esc ν€λ₯Ό λλ¬ λͺ λ Ήλͺ¨λλ‘ μ ν
4οΈβ£ :wq λ₯Ό μ λ ₯νκ³ μ μ₯νκ³ λκ°λ©΄ μ!!
μ¬μ€ μ΄λ»κ² λκ°λμ§ λͺ°λΌμ μμ€μ°½μ λλ λλ°, λ€νν μ μ©μ΄ μ λλ€. π(νν)
[Git] resetκ³Ό revert μκ³ μ¬μ©νκΈ°
GitμΌλ‘ νμ νλ‘μ νΈλ₯Ό μ§ννμλ€.κΉμΌλ‘ νμ νλλ° μ΅μμΉ μμν°λΌ νλ² pushλ₯Ό μλͺ»νκ±°λ, λ‘컬μ main λΈλμΉμμ μ격μ μ₯μλ‘λΆν° pullνκ³ κ±°κΈ°μ μλμ λ€λ₯΄κ² λ€λ₯Έ λΈλμΉμ merge ν΄
velog.io
https://wevus.net/it/git-push%EB%A5%BC-%EC%B7%A8%EC%86%8C-%ED%95%98%EB%8A%94-%EB%B0%A9%EB%B2%95/
git pushλ₯Ό μ·¨μ νλ λ°©λ² - WEVUS
μ€μλ‘ git pushν΄ λ²λ Έμ λμ λμ²λ²μ 2κ° μμ΅λλ€. git resetμ μ€ννλ©΄ μ΄μ μ»€λ° μνλ‘ λμκ° μ μμ΅λλ€. μ£Όλ‘ hardμ softμ λ κ°μ§ μ΅μ μ μ΄μ©ν©λλ€.
wevus.net
'πΆπππ·ππ' μΉ΄ν κ³ λ¦¬μ λ€λ₯Έ κΈ
[github] remote: Permission to *.git denied to 403 μ€λ₯ ν΄κ²° ssh key μΈμ¦ μ€μ λ°©λ² (1) | 2025.01.04 |
---|---|
[GIT] μ»€λ° μ€μ 볡ꡬνκΈ°: λ©μμ§ μμ κ³Ό μ·¨μ λ°©λ² μ΄μ 리 (0) | 2024.11.25 |
Github README Stack λ£κΈ° (0) | 2023.07.30 |
1-3. github.io ν λ§ μ μ© & νΈμ§νκΈ° (0) | 2023.07.22 |
[Error : Github build failed] theme could not be found. (0) | 2023.07.21 |