git撤销commit

2014-5-8 liyangweb.com 李杨 Web周边

如果不小心commit了不希望commit的内容,那么如何如何撤销commit呢?


先使用git log查看日志


commit 61b8d52c6dacf5dafaeadf9197ea945e1f225e0a

Author: liyang <liyangcoder@163.com>

Date:   Thu May 8 10:29:23 2014 +0800




   删除最近搜索数目限制


找到需要回退的commit的哈希值,这里是61b8d52c6dacf5dafaeadf9197ea945e1f225e0a

使用git reset --hard commit_id 命令进行回退  这里是

git reset --hard git 61b8d52

这里的哈希值并不需要完全输入,打入前面几位即可.


 

标签: git撤销commit

评论:

virgocity
2019-02-05 23:47
<a href="http://www.buscochef.com/asics-gel-lyte-5-soft-gris-marine-scarpeg">asics gel lyte 5 soft gris marine</a> <a href="http://www.cydendressage.com/zoom-kobe-9-azul-blanco-negro-oro-rojo-kurpesf">zoom kobe 9 azul blanco negro oro rojo</a> <a href="http://www.idlvisual.com/lebron-12-low-arancia-bianca-flag-schuheg">lebron 12 low arancia bianca flag</a> <a href="http://www.infoility.com/herre-nike-free-flyknit-4.0-sort-gr%C3%A5-schuheb">herre nike free flyknit 4.0 sort gr氓</a> <a href="http://www.khoshop.com/nike-zoom-pegasus-32-oransje-gr%C3%A5-chaussurese">nike zoom pegasus 32 oransje gr氓</a> <a href="http://www.poteputi.com/air-max-97-femmes-or-key-butyg">air max 97 femmes or key</a>
virgocity http://www.virgocity.com/
spotmygadget
2019-01-28 04:02
<a href="http://www.bcashed.com/nike-dunk-gituttio-rosa-butyc">nike dunk gituttio rosa</a> <a href="http://www.floraanafcheh.com/nike-zoom-cabos-marr%C3%B3n-verde-obuvg">nike zoom cabos marr贸n verde</a> <a href="http://www.kinkfresno.com/nike-shox-design-your-own-chaussures-kurpesa">nike shox design your own chaussures</a> <a href="http://www.modconsol.com/air-jordan-9-low-bianca-pelle-kurpesf">air jordan 9 low bianca pelle</a> <a href="http://www.portlandsarl.com/ralph-lauren-shorts-grigio-rosa-poloz">ralph lauren shorts grigio rosa</a> <a href="http://www.sandyshands.com/air-jordan-retro-3-gul-oransje-scarpeb">air jordan retro 3 gul oransje</a>
spotmygadget http://www.spotmygadget.com/
walterinsurance
2019-01-04 16:24
<a href="http://www.emtecsolutions.net/nike-lebron-soldier-10-p%C3%BArpura-broadway-schuhee">nike lebron soldier 10 p煤rpura broadway</a> <a href="http://www.erikspeyer.net/air-jordan-5-retro-t23-jaune-or-butyd">air jordan 5 retro t23 jaune or</a> <a href="http://www.etuckerart.net/nike-lebron-12-low-bl%C3%A5-and-hvid-obuvc">nike lebron 12 low bl氓 and hvid</a> <a href="http://www.etxahec.net/nike-pegasus-32-azul-lagoon-scarpee">nike pegasus 32 azul lagoon</a> <a href="http://www.eurekapps.net/nike-sb-eric-koston-2-max-court-lila-obuvd">nike sb eric koston 2 max court lila</a> <a href="http://www.evccharlotte.net/air-jordan-1-high-rouge-chaussuresg">air jordan 1 high rouge</a>
[url=http://www.walterinsurance.net/]walterinsurance[/url]
dbgbackoffice
2018-12-27 12:20
<a href="http://www.scottdepot.com/nike-flyknit-lunar2-wolf-gr%C3%A5-kit-kurpesa">nike flyknit lunar2 wolf gr氓 kit</a> <a href="http://www.troyafolklor.com/huarache-ultra-cool-gr%C3%A5-leggings-kurpesf">huarache ultra cool gr氓 leggings</a> <a href="http://www.ampflightads.com/ralph-lauren-pony-polo-gr%C3%B8n-r%C3%B8d-poloz">ralph lauren pony polo gr酶n r酶d</a> <a href="http://www.edotokyolabo.com/air-max-1-yeezy-for-verkauf-georgia-scarpeb">air max 1 yeezy for verkauf georgia</a> <a href="http://www.euniscpa.com/mens-nike-new-york-giants-56-lawrence-taylor-game-red-alternate-nfl-jersey-nfls">mens nike new york giants 56 lawrence taylor game red alternate nfl jersey</a> <a href="http://www.governisation.com/air-max-bw-ultra-gris-iron-scarpeg">air max bw ultra gris iron</a>
dbgbackoffice http://www.dbgbackoffice.com/

发表评论:

Powered by emlog 冀ICP备13011830号-1