{"id":622,"date":"2018-06-28T09:56:38","date_gmt":"2018-06-28T07:56:38","guid":{"rendered":"http:\/\/stefano.salvatori.cl\/blog\/?p=622"},"modified":"2018-06-29T11:47:43","modified_gmt":"2018-06-29T09:47:43","slug":"sync-git-repositories","status":"publish","type":"post","link":"https:\/\/stefano.salvatori.cl\/blog\/2018\/06\/28\/sync-git-repositories\/","title":{"rendered":"Sync git repositories"},"content":{"rendered":"<p>Sometimes I need\/have to sync a private repository with a public one, so this is what I usually\u00c2\u00a0 do.<\/p>\n<p><strong>Add a new remote<\/strong><\/p>\n<pre lang=\"bash\">git remote add github https:\/\/github.com\/elastic\/ansible-elasticsearch.git<\/pre>\n<p><strong>Pull the new commits from master<\/strong><\/p>\n<pre lang=\"bash\">git pull github master<\/pre>\n<p><strong>Push new commits to origin<\/strong><\/p>\n<pre lang=\"bash\">git push origin master<\/pre>\n<p><strong>Push new tags<\/strong><\/p>\n<pre lang=\"bash\">git push --tags origin<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes I need\/have to sync a private repository with a public one, so this is what I usually\u00c2\u00a0 do. Add a new remote git remote add github https:\/\/github.com\/elastic\/ansible-elasticsearch.git Pull the new commits from master git pull github master Push new commits to origin git push origin master Push new tags git push &#8211;tags origin<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[26,1],"tags":[136,241,215],"class_list":["post-622","post","type-post","status-publish","format-standard","hentry","category-tips","category-uncategorized","tag-code","tag-git","tag-tips"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p5Pxa3-a2","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/stefano.salvatori.cl\/blog\/wp-json\/wp\/v2\/posts\/622","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/stefano.salvatori.cl\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/stefano.salvatori.cl\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/stefano.salvatori.cl\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/stefano.salvatori.cl\/blog\/wp-json\/wp\/v2\/comments?post=622"}],"version-history":[{"count":4,"href":"https:\/\/stefano.salvatori.cl\/blog\/wp-json\/wp\/v2\/posts\/622\/revisions"}],"predecessor-version":[{"id":626,"href":"https:\/\/stefano.salvatori.cl\/blog\/wp-json\/wp\/v2\/posts\/622\/revisions\/626"}],"wp:attachment":[{"href":"https:\/\/stefano.salvatori.cl\/blog\/wp-json\/wp\/v2\/media?parent=622"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/stefano.salvatori.cl\/blog\/wp-json\/wp\/v2\/categories?post=622"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/stefano.salvatori.cl\/blog\/wp-json\/wp\/v2\/tags?post=622"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}