Create a warehouse branch in a 3.GitHub translation

Source: Internet
Author: User

Original document: https://help.github.com/articles/fork-a-repo/


Target by Nebula

A warehouse branch is a copy of a warehouse, and copying a warehouse can free experiment changes without affecting the original project.
Most commonly, a warehouse branch is a starting point for making changes or using someone else's project as your own idea.
make a change project to someone else


A good example of using a warehouse branch is recommendations, modifications, bug fixes,Rather than documenting a problem,

you find that you can:
Create a warehouse branch
Modify
submit an upload request to the project owner
If the project owner likes your modified items, they may pin your modified items in the original repository!

other people's projects as a starting point for your own ideas
The core idea in open source is that by sharing code, we can develop better, more reliable software.
in fact, when you create a library on GitHub, you can choose to include the license file automatically, which determines that you want your project to be shared with others.

Create a warehouse branch


Creating a warehouse branch takes just two simple steps, and now we'll create a try. on GitHub, we open a project link,Https://github.com/octocat/Spoon-Knife Click the "Fork" button in the upper right corner of the page




In a few seconds you will find that there is an extra project in your warehouse.



Keep your branch in sync
Install git
If you haven't installed git yet, please refer to the   http://blog.csdn.net/hadues/article/details/48091065
Create a local project branch on your own GitHub home page, click on the Spoon-knife warehouse in your own warehouse,
Copy the URL in the browser address bar, such as Https://github.com/fairyxingyun/Spoon-Knife
Open git terminal, enter command
git clone https://github.com/fairyxingyun/Spoon-Knife
Press Enter and you will find:


Now you have a local repository branch.




Configure git sync to the local branch warehouse you created
Go to Folder command: CD listing file list: ls
Go to a folder in a list: cd folder name
Go back to the top level directory: CD.
see which remote warehouses are currently configured:git remote-v

                                Note:                         The first time you enter Git remote-v and then press ENTER may not react.
you need to execute the command at this time:git remote add upstreamHttps://github.com/fairyxingyun/Spoon-Knife
        Make some restrictions on the branch, such as you can:
Creating branches (create Branch):Creating a branch allows you to create new features or test the idea without risking your main project being compromised.
  Opening Pull requests (open push request):If you want to go back to the original library, you can send a request to the original author to submit your branch to the library for a push request
find a warehouse to do a branch:
Each public library can do a branch, so find anotheryou're interested in.Project and get a branch.
Https://github.com/explore This site is a great place to look for interesting open source projects, visit these pages frequently, and you can watch some news and new tools.








Create a warehouse branch of a 3.GitHub translation

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.