首页  

git回退到之前的版本     所属分类 git 浏览量 1082
git log -6

commit 7afc544a1c1be8079035df3598df8505be80c4e6
Author: dugang  
Date:   Tue Aug 20 17:15:21 2019 +0800

    update

commit 19b15f5b388fde5321351a49465a2476d78fe0e3
Author: dugang  
Date:   Mon Aug 19 18:47:49 2019 +0800

    add RedisUtil

commit 792d4bbe4d3dfd6cd43a5f8ac629efa8497d7c66
Author: dugang 
Date:   Thu Aug 15 14:47:18 2019 +0800

    redisdemo init

commit 6cbfa14da031309cfd24bf870203ac895c328796
Author: dyyx  
Date:   Thu Aug 15 14:38:04 2019 +0800

    Initial commit


选择需要回退的历史版本 commitid 
git reset --hard 19b15f5b388fde5321351a49465a2476d78fe0e3

HEAD is now at 19b15f5 add RedisUtil


git push  无法push

加 -f 强制推送 
git push -f


reset之后 可创建新分支  再push   加 
git push --set-upstream origin newbranch




git log 

commit b72b2bcc6d93e328b1ff699dc75ce47ca77e628b
Author: xxx  xxx@abc.com 
Date:   Fri Jan 10 11:55:29 2020 +0800


git reset xxx
git reset --hard xxx

git log 

commit 4ac8d28aaaa4c5d93ccc2b1a6e0e1461a93c2ad3
Author: xxx xxx@abc.com
Date:   Fri Dec 27 11:08:43 2019 +0800


git checkout -b newbranch
git push --set-upstream origin newbranch

上一篇     下一篇
redis复杂嵌套数据结构处理

aerospike VS redis

Redis HyperLogLog 使用

git合并处理

数据结构要点

hive四种存储格式