Git uses the five--github on the Fork project to keep pace with the original project _git learning

Source: Internet
Author: User
Tags git clone

Git uses one of the basic uses of--git
Git uses the second ——. Gitignore file detailed
Git using the three ——. git folder detailed
The installation of the GitHub desktop version of Git using the quad--windows
Git uses the five--github to keep the fork project synchronized with the original project
Git uses the six--github work together Fork+pull Request
The seven--android of git use the correct usage problem of git under studio

A few days ago in GitHub on the fork of a project, today found the problem, the original author updated the code, I did not change, so again fork, still no update, depressed, online search, found a lot of small partners encountered this problem, and then in this record, So that a small partner with the same problem in the back can quickly resolve the problem. Resolve 1 Re Fork

The fork here is not to say you direct point fork, this is useless, you want to delete from your Storehouse fork to project, then fork again, this posture is not good ... 2 Right way

The method is to establish two libraries in the local intermediary, the two remote libraries are clones to the local, and then pull the original project update to the local, merge updates, and finally push to your github to complete. Clone

I'm going to set up this intermediary under E, which is the local warehouse, into E disk, right button, Git bash to open the console, clone your own remote repository:

$ git clone https://github.com/jp1017/FastAndroid.git
1 1

Then the CD fastandroid, goes into the warehouse, executes the command: Git remote-v

1 1

We can see that only our own remote warehouse, under Clone original project to the warehouse

$ git remote add Hunter https://github.com/huntermr/FastAndroid.git
$ git remote-v
1 2 1 2

This hunter name casually take Oh, this time has two remote branch slightly, we continue to fetch

Then fetch the original project update to the Local: Git fetch hunter

$ git fetch Hunter
1 1

View Next Branch:

$ git Branch-av
1 1

A local branch master, three remote branches, the red line is to merge the oh merge

$ git checkout master
$ git merge hunter/master
1 2 1 2

Push

$ Git push-u Origin Master
1 1

The local warehouse is already up to date after the merge, and the push to your GitHub is done synchronously. 3 GitHub Desktop Edition

This requires the help of GitHub Desktop Edition, Windows installation reference my other blog: Git uses the four--windows GitHub desktop version of the installation

After installation, clone to local, and then click Sync, so that the local update Oh, and then the computer under GitHub, synchronized.

Get.

Enjoy

Yue share, the happier ^_^

Welcome to Exchange, reprint please indicate the source, thank you.

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.