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

How to modify the annotated side of git

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

How to modify the annotated side of git? for this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.

Git modify the annotation method: 1, use the "git commit-- amend-m" command, you can modify the content of the note before there is no push; 2, use the "git push-f" command, you can modify the content of the comment after push.

This article operating environment: Windows10 system, Git2.30.0 version, Dell G3 computer.

How to change the comments in git

1. If you don't have push, you need to modify the comments before.

See how many times you have submitted it, and then execute it.

Git rebase-I HEAD~ number (how many times do you want to modify your submission)

Next, modify the comments

Git commit-amend

Save after modifying the comment, execute

Git rebase-continue

Finally, you can push and execute.

Current branch name of git push origin

Modify comments after 2.push

You can execute the above command first, and then execute the following command violently:

The operation is the same as above, but in the end you need to force push (this is because the remote branch push is overwritten)

Git push origin current branch name-f

This is the answer to the question about how to modify the annotated side of git. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.

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: 300

*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

Internet Technology

  • Hadoop cluster building (3) configuring ubermo mode

    Stop all services [root@hadoop01 hadoop-2.7.1] # vim. / etc/hadoop/mapred-site.xml

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

    12
    Report