되돌리기

2023. 1. 9. 16:15Git

Git은 버전관리 프로그램이고 언제든지 이전 버전으로 돌아가거나 문제가 되는 commit 을 취소할 수 있다.

그리고 이는 git restore, git revert, git reset 명령어를 통해 수행할 수 있다.

1. 파일 하나를 되돌릴때, Restore

git restore file_name, git restore --source <commitId> file_name

2. 특정 커밋을 되돌릴때, Revert

git revert <commitId>

'Git' 카테고리의 다른 글

흘git흘git (1)  (0) 2022.08.10