IDEA shares the project to Git@OSC/GitHub
Premise: for a new project, you need to establish version base management in Git@OSC.
1. Of course, the first step is to create a warehouse on Git@OSC and get the HTTP of the Git@OSC warehouse to connect to https://git.oschina.net/*****/***.git.
two。 If our local project is a non-git project, we need to turn it into a git project first.
VCS--Import into Version Control--Create Git Repository-- selects your local project in idea
3. Through git shell (you can install git for window), go to the project directory and execute the following command
# set up a remote warehouse for the project # git remote add origin http://git.oschina.net/*****/***.git# grabs the remote warehouse data and automatically merges the remote branch # git pull origin master# updates the local data to Git@OSC # git push origin master# to solve the problem that cannot be updated git branch-set-upstream-to master origin/master # Delete project git information git remote rm origin
If pull or push fails, please refer to the git prompt to solve the problem. Refer to the blog: http://blog.csdn.net/dengjianqiang2011/article/details/9260435
If there are all kinds of inexplicable problems with the above operations, and you can't find a decent solution online, there is another way:
1. Create a new folder locally and clone the projects above Git@OSC to this folder
two。 Cut the project source code into the directory git push and import it into IDEA or other development tools.