Git learning, git

Source: Internet
Author: User

Git learning, git

If we fork other people's code, after a period of time, we need to first obtain the original author's code to the local.

Let's take a look at what remote warehouses are available. The method of submitting code to the original author I mentioned in my blog above (Portal: http://blog.csdn.net/alps1992/article/details/38548107)


Check git remote-v:

➜ /Users/alps/Sites/zhaonong/html git:(master) ✗>git remote -voriginhttps://github.com/chenfushan/zhaonong (fetch)originhttps://github.com/chenfushan/zhaonong (push)upstreamhttps://github.com/Fanset/zhaonong (fetch)upstreamhttps://github.com/Fanset/zhaonong (push)


We can see that I have two remote cries here. origin is my remote warehouse, and upstream is the source address of my fork.


Then we can pull the upstream code to the local device.

 /Users/alps/Sites/zhaonong git:(master) ✗>git pull upstream masterFrom https://github.com/Fanset/zhaonong * branch            master     -> FETCH_HEADUpdating e3ac498..b4c0b21Fast-forward README.md                  |    6 + css/style.css              |   45 + html/.DS_Store             |  Bin 6148 -> 0 bytes html/address.html          |   90 +- html/goodspage.html        |   25 +- html/list_of_economic.html |   19 +- html/list_of_gift.html     |    7 +- html/list_of_portable.html |   14 +- html/management_ad.html    |    0 html/management_pd.html    |    0 html/order_commit.html     |   73 +- html/orderpage.html        |   23 +- html/undefined.html        |   11 +- image/.DS_Store            |  Bin 6148 -> 0 bytes js/getUrl.js               |   16 +- js/getcookie.js            |   16 + js/goodspage.js            |    6 +- js/jquery-2.1.1.js         | 9190 -------------------------------------------- 18 files changed, 214 insertions(+), 9327 deletions(-) create mode 100644 README.md create mode 100644 css/style.css delete mode 100644 html/.DS_Store create mode 100644 html/management_ad.html create mode 100644 html/management_pd.html delete mode 100644 image/.DS_Store create mode 100644 js/getcookie.js delete mode 100644 js/jquery-2.1.1.js

Then
git merge master
This may not be required.

Assume that it is on the master branch.

➜ /Users/alps/Sites/zhaonong git:(master) ✗>git push origin masterCounting objects: 81, done.Delta compression using up to 4 threads.Compressing objects: 100% (60/60), done.Writing objects: 100% (61/61), 7.54 KiB | 0 bytes/s, done.Total 61 (delta 43), reused 0 (delta 0)To https://github.com/chenfushan/zhaonong   e3ac498..b4c0b21  master -> master

Now all the code is synchronized.




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.