In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article is to share with you about how to cancel changes, restore versions, and fallback commands in git. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Git cancels modification, restore version command Daquan fallback command
# cancel changes to the file. Revert to the most recent version and discard local changes.
Git checkout--
# cancel files that have been temporarily saved. That is, undo the previous operation of "git add"
Git reset HEAD...
# modify the last submission. Used to modify the last submission information, or omission of submission documents, and so on.
Git commit-amend
# rollback all content to the previous version
Git reset head ^
# roll back the a.py version of this file to the previous version
Git reset head ^ a.py
# go back to version 3
Git reset-soft HEAD~3
# return the local status to the same as the remote one
Git reset-hard origin/master
# fallback to a version
Git reset 057d
# go back to the status of the last submission, and perform a commit completely in reverse according to a certain commit. (the code rolls back to the previous version and commits git)
Git revert HEAD
Thank you for reading! About "cancel the modification in git, restore the version, fallback command how to write" this article is shared here, I hope the above content can be of some help to you, so that you can learn more knowledge, if you think the article is good, you can share it out for more people to see it!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.