intellij-idea - How to push the code cloned from github to another platform? For example, upload it to code cloud or the like? The environment is IjIdea
伊谢尔伦2017-05-02 09:51:03
0
6
1248
How to push the code cloned from github to another platform? For example, upload it to code cloud? The environment is IjIdea
Which remote warehouse you upload (whether it is Code Cloud, Github or other hosting platforms) is mainly related to the settings of your local warehouse. A local warehouse can add multiple remote warehouses. If you have the git command line installed on your computer, you can use the following command to view the remote repository you are currently associated with:
git remote -v
If you want to add another remote warehouse, first you need to know the url of the remote warehouse, and then use:
git remote add <name> <url-of-remote>
Add a remote warehouse, <name>refers to the alias of the remote warehouse, such as origin, mayun, it can be anything, as long as you can understand it yourself. The second parameter is the url of the remote warehouse.
When you use git push push, you should specify the remote repository:
git push <name of remote repository> <name of branch>
The first parameter is the alias of the remote warehouse we just mentioned, such as the commonly used origin, etc., and the latter parameter is the branch name.
The above method is for the git command line. I just realized that you may be using the git plug-in that comes with IED, so I will make some simple additions here. Since I have not used IjIdea, I just guess that you can find the settings for the remote warehouse in the git menu item. I strongly recommend that you use the git command line, because it can complete many operations that cannot be completed by the graphical interface and is very flexible.
Open the config file in the .git directory and add a remote. When pushing, you can push it to the new remote, or you can push it to the old one, whatever.
Step one:
Step 2:
Which remote warehouse you upload (whether it is Code Cloud, Github or other hosting platforms) is mainly related to the settings of your local warehouse. A local warehouse can add multiple remote warehouses. If you have the git command line installed on your computer, you can use the following command to view the remote repository you are currently associated with:
If you want to add another remote warehouse, first you need to know the url of the remote warehouse, and then use:
Add a remote warehouse,
<name>
refers to the alias of the remote warehouse, such as origin, mayun, it can be anything, as long as you can understand it yourself. The second parameter is the url of the remote warehouse.When you use
git push
push, you should specify the remote repository:The first parameter is the alias of the remote warehouse we just mentioned, such as the commonly used origin, etc., and the latter parameter is the branch name.
The above method is for the git command line. I just realized that you may be using the git plug-in that comes with IED, so I will make some simple additions here. Since I have not used IjIdea, I just guess that you can find the settings for the remote warehouse in the git menu item. I strongly recommend that you use the git command line, because it can complete many operations that cannot be completed by the graphical interface and is very flexible.
Open the config file in the
.git
directory and add a remote. When pushing, you can push it to the new remote, or you can push it to the old one, whatever.First you need to create a new remote warehouse (bare library) on another platform
Then you can add a new remote warehouse address locally
Don’t know how to operate in idea?
The process is the same as github, you just need to replace the push address