Re-learning git-remote Repository

Source: Internet
Author: User

Run git remote add <shortname> <url> add a new remote Git repository and specify a shorthand that you can easily refer to:

$git remote origin $ git remote add pb https://github.com/paulboone/ticgit $ git remote-voriginhttps://github.com/schacon/ticgit (fetch)originhttps://github.com/schacon/ticgit (push)pbhttps://github.com/paulboone/ticgit (fetch)pbhttps://github.com/paulboone/ticgit (push)

You can now use strings in the command line pb instead of the entire URL.

Renaming

$Git remote rename PB paul $ git remoteoriginpaul

It is important to note that this will also modify the name of your remote branch. Those that used pb/master to be quoted are now quoted paul/master .

If, for some reason, you want to remove a remote repository-you've moved away from the server or you no longer want to use a particular image, or a contributor is no longer contributing-you can use git remote rm :

$Git remote rm paul $ git remoteorigin

Re-learning git-remote Repository

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.