Git uploads local IntelliJ idea project to GitHub

one Install the Git client
Install git client under Window.
 
two Configure Git/ GitHub in Intellij idea
Open Preference– Version Control.
 
Drop down and select Github, fill in Host, Login, and Password, and Test was successful.
 
Select Git and specify the Git path. Test to see if the function is working.
 

 
 

3. Project local Git commit
1. Create a local warehouse

 
2. Commit code to Git

 
Right-click on the SRC or code file, and Git — Add — Commit
 
Four. Project remote submission
1. Set up a warehouse on Github
2. Configure the remote warehouse locally
CD local warehouse directory
Git RemoteAdd Origin the address of your project
git push-u origin master
 
 
There’s going to be a problem here.


The reason is that when we created the warehouse on Github, we checked the default READme.md, which caused a mismatch between local and remote warehousing.
 
Solutions:
The Git pull origin master

 
And then git push-u Origin master
 
 
3. Push/Pull in IDEA
 
Right-click on the SRC or code file, Git — Repository — Push/Pull

 


Read More: