git upload items to the local Intellij idea git repository in the cloud code

One. Install git client

Install git client for Window.

 

two. Configuration Intellij idea of ​​Git / GitHub

Open Preference-- Version Control.

 

Drop-down selection Github, fill in the Host, Login and Password, then Test was successful.

 

After selecting Git, Git specified path, Test test function is normal.

three. Local Git project submitted

1. Create a local project, and open version control

2. Submit the code to git

Right-click the src or code files, Git - Add - Commit (to Add and then Commit)

At this point, to build their own warehouses address of the remote input into:

Then push.

At this point it will error:

Denied, because the establishment of a warehouse when a readme file will be generated by default, resulting in sync, so I can not push, can not pull, the solution is as follows:

git pull origin master --allow-unrelated-histories

 Start with the master branch pull down.

 

Ok then go on to submit a push!

 

Transfer: https://www.cnblogs.com/gmq-sh/p/7664802.html

Install git client for Window.

 

two. Configuration Intellij idea of ​​Git / GitHub

Open Preference-- Version Control.

 

Drop-down selection Github, fill in the Host, Login and Password, then Test was successful.

 

After selecting Git, Git specified path, Test test function is normal.

three. Local Git project submitted

1. Create a local project, and open version control

2. Submit the code to git

Right-click the src or code files, Git - Add - Commit (to Add and then Commit)

At this point, to build their own warehouses address of the remote input into:

Then push.

At this point it will error:

Denied, because the establishment of a warehouse when a readme file will be generated by default, resulting in sync, so I can not push, can not pull, the solution is as follows:

git pull origin master --allow-unrelated-histories

 Start with the master branch pull down.

 

Ok then go on to submit a push!

 

Transfer: https://www.cnblogs.com/gmq-sh/p/7664802.html

Guess you like

Origin www.cnblogs.com/ithfm/p/10945275.html