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

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(6)
过去多啦不再A梦

Step one:

git remote add REMOTE_NAME ANOTHER_REPO_URL

Step 2:

git push REMOTE_NAME BRANCH_NAME
世界只因有你

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.

Ty80

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

git init --bare (then use the warehouse address as the subsequent url)

Then you can add a new remote warehouse address locally

git remote add new_origin [url]

Has nothing to do with IjIdea

迷茫

Don’t know how to operate in idea?

PHPzhong

The process is the same as github, you just need to replace the push address

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template