Git remote pull push usage summary, gitpull

Source: Internet
Author: User

Git remote pull push usage summary, gitpull

Git remote

Remote Warehouse Management

1.1 view the existing URL of the logistics warehouse

Git remote-v

1.2 Add the path repository URL

Git remote add origin git@192.168.1.1:/home/git/gitdemo. git

1.3 Delete the path repository URL.

Git remote rm origin

1.4 change the remote repository address. Change to a new url address.

Git remote set-url origin

1.5 push to multiple version libraries at the same time [push to github, and push to open-source China Git @ OSC]

First, add the first address git remote add origin

Then add the second address git remote set-url -- add origin

Add the third address git remote set-url -- add origin

// You can directly add a url to the config file to modify the file. You do not have to execute the git command.

[When you use git to push origin master, you can push multiple URLs of origin, but when you use git pull, you can only pull one url address (fetch-url, for example, the fetch-url is the first address you add to the origin by default,

If you want to change it, you only need to change the order of the three URLs in the config file. fetch-url will directly correspond to the top utl connection .]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.