Initial knowledge of Git:intellij idea configuring git steps and how to upload a local warehouse project to a git repository steps

Source: Internet
Author: User
Tags wrapper
Step one: Visit the git website (gitforwindows.org/) to download the required git installation package. Step two: idea== "file==" setting== "①==" ②

Step three: In the pop-up screen search gitee plug-in download and install, installation steps directly click Next until the installation is successful. Step four: Still open file== "setting==" in order to operate (note: If you follow the default path to install git, the installation path shown can be used as a reference), click the test tests successfully to proceed to the next step.

Step Five: Configure the idea connection Gitee, in order to operate. ③ is to fill in the Gitee (code cloud) user name, ④ is to fill in the Gitee (Code cloud) password. Idea Login to Gitee account. (Note: The test button tests whether the connection is successful)

Step six: After a successful connection, there are two ways to create the Gitee project warehouse.

Way One: Idea creates a local warehouse that is automatically connected to the Gitee warehouse.

First step: Follow the steps to assign items on the gitee.

The second step: for example, ① is to fill in the local warehouse name, ② is to fill in the remote warehouse name ③ is to determine the allocation or creation (note: Private indicates whether the creation of the warehouse is private, after the assignment is complete, the bottom left corner will appear the success prompt box). Once successful, a remote repository is created.

Method Two: Import the idea project to a remote repository that has already been created. (The following operations are implemented via CMD)

The first step: convert the local warehouse to a repository and add the project to the version, and enter the cmd command.

1.CD your project Local path (enter into your project)

2.git Init (Initialize "create" local repository, after performing this operation, your project will automatically generate a hidden folder called Git)

3.git add-a a folder under your project (add the folder you want to upload to the cache and add multiple folders with multiple actions)

4.git commit-m "description" (Submit the buffer file to the Gitee warehouse, and can add a description, first use should be based on the CMD prompt to fill in the user name and mailbox.) )

Step Two: Associate a local warehouse with a remotely created warehouse

Git remote Add Project path on Origin Gitee (example: gitee.com/xxx.git)

Step three: Pull the Gitee remote repository file

Git pull origin Master----allow-unrelated-histories

Fourth step: Push the local warehouse project to the Gitee remote repository

Git push-u Origin Master

Here, has completed the installation and creation, login to the code cloud Gitee official website to view the files imported under the project can be.

PS: The above article is prepared by personal project experience, if there is a lack of points to point out, I hope this article is helpful to you.

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.