Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- copy-dependencies
- 네트워크
- import
- lsof
- tomcat
- netsh
- Quartz
- Source
- Windows
- 단축키
- JavaScript
- find
- context
- 공통표준용어
- GIT
- bash
- VirtualBox
- web.xml
- grep
- Eclipse
- xargs
- ssh
- resource
- maVen
- port
- Mac
- IntelliJ
- profile
- DB 도메인
- Windows 10
Archives
- Today
- Total
develog
[git] reset 본문
reset 을 하면
- reset 한 커밋, 이후 로그가 삭제되고
- reset 한 커밋, 이후 수정내용이 unstaged 상태로 바뀐다
- reset 실행 전
$ git log --oneline
0a2d818 (HEAD -> master) add section 2
6ced8d4 add section
49e50c8 change title ## reset 할 커밋
26d36a0 add index.html
$ git status
On branch master
nothing to commit, working tree clean
- reset 실행
$ git reset 49e50c8
Unstaged changes after reset:
M index.html
- reset 실행 후
## reset 한 커밋 이후 삭제된다
$ git log --oneline
49e50c8 (HEAD -> master) change title
26d36a0 add index.html
## reset 한 커밋 이후 수정내용이 unstaged 상태로 바뀐다
$ git status
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: index.html
no changes added to commit (use "git add" and/or "git commit -a")
'Dev > git' 카테고리의 다른 글
[git] switch (0) | 2022.04.03 |
---|---|
[git] clone vs fork (0) | 2022.04.03 |
[git] revert (0) | 2022.04.03 |
[git] checkout commit (0) | 2022.04.01 |
[git] master >R> (0) | 2022.03.31 |
Comments