Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Remote code base rollback operation

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Remote code base rollback

Git branch test_backup / / back up the current situation of this branch

Git reset-- hard the_commit_id / / rollback test locally to the_commit_id

Git push origin: test / / Delete remote test

Git push origin test / / re-establish a remote branch with the rolled-back local branch

Git push origin: test_backup / / if the previous is successful, delete the backup branch

Local code synchronization

Git checkout master switches to the main branch

Git branch-D zcplan_new delete zcplan_new branch

Git fetch origin zcplan_new:zcplan_new reacquires the branch

Git checkout zcplan_new switches to zcplan_new

Git fetch origin remote branch name x: local branch name x

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report