In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains the "git version management push event revocation steps", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's train of thought slowly in depth, together to study and learn "git version management push event revocation steps"!
Abstract
In the Internet projects of a few years ago, people often use svn for version management. With the continuous optimization of git and the evolution of Internet architecture model, git is more and more favored by developers. Several projects that bloggers have experienced have also used git as the version management of the project. After most of the projects are initialized, dev and test branches will be added to facilitate the management of the development code (some projects will also set up more branches to manage). In general, we all require developers to only allow commit and push operations of the code in the dev branch. Of course, sometimes you can't avoid someone who is not afraid to push code in test or other non-dev branches. The blogger experienced such a thing in his previous company, when there were still many branches of our project (don't ask me why I opened so many branches, as requested by Party A), and made a mess several times after being mistakenly pushed the code by new colleagues. In this article, let's solve this problem.
Undo step (assuming the code was mistakenly pushed in the test branch)
1-> git log
Check your submission record and find the last version number.
2-> git reset-- soft
Parameter soft refers to: keep the current workspace, so that resubmit can also select the parameter hard, will undo the changes to the corresponding workspace, must be used with caution
3-> git push origin master-f
After fallback, push the pre-commit code to the remote branch
4-> done.
Thank you for reading, the above is the content of "git version management push event revocation step". After the study of this article, I believe you have a deeper understanding of the push event revocation step of git version management, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.