Git server code submission Summary (2)

Source: Internet
Author: User

Tag: git

When submitting code on the GIT server, we may have some information to be modified when writing the code modification content. In this case, it is very troublesome to cancel the original operation and resubmit it,

So today I will share with you the solutions to my problems. Of course, it also allows you to look at it when you forget it in the future.

1, git commit -- mend

This command is mainly used when you need to modify some code comments after submitting the code.

2, git branch-

View All branch names.

3. Git status

View All modified files in the current directory and Its subdirectories.

4. Git diff

View the contents of the modified files in the current directory and Its subdirectories.

5. Git log + file.

View the previous modification content of the file and Its submitter.

6. An important warning command. Must be used with caution,
Git reset head ^

This command is mainly used to cancel the current commit operation, but this command also has a side effect, that is, when you submit for the second time, there will be some error information to be processed. However, I

It is not clear how to handle the problem.

7. Note that after each code submission, the local branch can be changed, but the local branch name must be consistent with the local name submitted to the remote branch when the code is submitted.

Git server code submission Summary (2)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.