{"id":520,"date":"2021-07-14T05:49:19","date_gmt":"2021-07-14T05:49:19","guid":{"rendered":"http:\/\/emacslisp.com\/?p=520"},"modified":"2021-07-14T05:49:19","modified_gmt":"2021-07-14T05:49:19","slug":"git-how-to-sync-with-two-remote-repos-using-git","status":"publish","type":"post","link":"http:\/\/emacslisp.com\/?p=520","title":{"rendered":"Git &#8211; How to sync with two remote repos using git"},"content":{"rendered":"<p>git remote -v<br \/>\ngit remote<br \/>\ngit remote add pb https:\/\/github.com\/paulboone\/ticgit<\/p>\n<p>$ git remote -v<br \/>\norigin\thttps:\/\/github.com\/schacon\/ticgit (fetch)<br \/>\norigin\thttps:\/\/github.com\/schacon\/ticgit (push)<br \/>\npb\thttps:\/\/github.com\/paulboone\/ticgit (fetch)<br \/>\npb\thttps:\/\/github.com\/paulboone\/ticgit (push)<\/p>\n<p>$ git fetch pb<br \/>\nremote: Counting objects: 43, done.<br \/>\nremote: Compressing objects: 100% (36\/36), done.<br \/>\nremote: Total 43 (delta 10), reused 31 (delta 5)<br \/>\nUnpacking objects: 100% (43\/43), done.<br \/>\nFrom https:\/\/github.com\/paulboone\/ticgit<br \/>\n * [new branch]      master     -> pb\/master<br \/>\n* [new branch]      ticgit     -> pb\/ticgit<\/p>\n<p>$ git checkout master<\/p>\n<p>$ git merge upstream\/master  # important, merge fetch code and master<\/p>\n<p>$ git push<\/p>\n","protected":false},"excerpt":{"rendered":"<p>git remote -v git remote git remote add pb https:\/\/github.com\/paulboone\/ticgit $ git remote -v origin https:\/\/github.com\/schacon\/ticgit (fetch) origin https:\/\/github.com\/schacon\/ticgit (push) pb https:\/\/github.com\/paulboone\/ticgit (fetch) pb https:\/\/github.com\/paulboone\/ticgit (push) $ git fetch pb remote: Counting objects: 43, done. remote: Compressing objects: 100% (36\/36), done. remote: Total 43 (delta 10), reused 31 (delta 5) Unpacking objects: 100% (43\/43), done. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-520","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/emacslisp.com\/index.php?rest_route=\/wp\/v2\/posts\/520","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/emacslisp.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/emacslisp.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/emacslisp.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/emacslisp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=520"}],"version-history":[{"count":1,"href":"http:\/\/emacslisp.com\/index.php?rest_route=\/wp\/v2\/posts\/520\/revisions"}],"predecessor-version":[{"id":521,"href":"http:\/\/emacslisp.com\/index.php?rest_route=\/wp\/v2\/posts\/520\/revisions\/521"}],"wp:attachment":[{"href":"http:\/\/emacslisp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=520"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/emacslisp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=520"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/emacslisp.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=520"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}