Git's personal usage Summary-idea command line and withdrawal of COMMIT (to be continued)

Source: Internet
Author: User
Tags git commands

Recently, I was using git and started to operate on the idea interface. Later I asked to use command lines. At the beginning, I was not very used to it. I felt very troublesome. After using it for a few days, I felt very good!

In fact, there are not many git commands, and you will be able to use them smoothly after a while. Various problems have been encountered during use, and some small problems are summarized here.


1. Idea command line. After git is installed, it comes with the terminal git bash, which is easy to use. However, it is difficult to open git bash in the corresponding folder after development using idea. In fact, idea also has terminal, which can be found at the bottom and can be executed here. However, if git is installed by default, you cannot enter the GIT command in the idea terminal because the path is not configured. In fact, when installing git, note that the third option is to automatically configure the path installation method. Select the installation method. In this way, you can operate git directly on the idea terminal.


2. Undo commit and submit again. Commit made some changes, but found that there was an error. In fact, you can append the Amend with the error modification. However, if we use Gerrit and push, this commit is abandon, so that we cannot use the same changid for submission. In this case, you need to cancel the commit, but keep the code modification and resubmit it again. In this case, you can git reset -- mixed ***** (*** is the ID of the previous commit) to cancel this submission and retain the changed source code, then, click Add-> commit.

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.