Jim's Blog
Toggle navigation
Jim's Blog
Home
About Me
Archives
Tags
Revert while keeping earlier commit records in Git
2016-10-20 02:41:28
142
0
0
jim
# Commit some changes ```shell # ... git commit -am "0" # got hash hash0 # ... git commit -am "1" # got hash hash1 # ... git commit -am "2" # got hash hash2 # ... git commit -am "3" # got hash hash3 ``` # Revert change 1, 2, and 3 ```shell git reset --hard hash0 git reset --soft hash3 git commit -am 'Reverted 1 2 3' ```
Pre:
ARMv7 Docker emulator in QEMU
Next:
Remove a submodule in Git
0
likes
142
新浪微博
微信
腾讯微博
QQ空间
人人网
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus
Table of content