{"id":36726,"date":"2016-05-11T11:00:50","date_gmt":"2016-05-11T08:00:50","guid":{"rendered":"http:\/\/examples.javacodegeeks.com\/?p=36726"},"modified":"2019-04-23T14:51:25","modified_gmt":"2019-04-23T11:51:25","slug":"git-push-origin-example","status":"publish","type":"post","link":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-push-origin-example\/","title":{"rendered":"Git Push Origin Example"},"content":{"rendered":"<p>In this example, we shall understand <code>git push origin<\/code> command. <code>git push<\/code> command updates remote references using local references by sending objects necessary to complete the given references.<\/p>\n<p>In simple words, <code>git push<\/code> command updates remote repository with local commits. <code>origin<\/code> represents remote name where user wants to push the changes. Let&#8217;s understand this command in more detail.<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;\n<\/p>\n<h2>1. Git Push<\/h2>\n<p><code>git push<\/code> command push commits made on local branch to a remote repository.<\/p>\n<p>The git push command basically takes two arguments:<\/p>\n<ul>\n<li>A remote name, for example, origin<\/li>\n<li>A branch name, for example, master<\/li>\n<\/ul>\n<p>This makes the structure of command as:<br \/>\n<code>git push &lt;REMOTENAME&gt; &lt;BRANCHNAME&gt;<\/code><\/p>\n<p>In case command line doesn&#8217;t specifies where to push with the <i>REMOTENAME<\/i> argument, <code>branch.*.remote<\/code> configuration for the current branch is referred to determine where to push. If the configuration is missing, it defaults to <code>origin<\/code>.<\/p>\n<h2>2. Git Push Origin in Action<\/h2>\n<p>To see <code>git push origin<\/code> command in action, we shall start with creating a git repository.<\/p>\n<p>First we shall create a directory for master branch.<\/p>\n<p><figure id=\"attachment_37031\" aria-describedby=\"caption-attachment-37031\" style=\"width: 568px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Create-Directory-for-Master-Branch.jpg\"><img decoding=\"async\" class=\"size-full wp-image-37031\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Create-Directory-for-Master-Branch.jpg\" alt=\"Create Directory for Master Branch\" width=\"568\" height=\"366\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Create-Directory-for-Master-Branch.jpg 568w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Create-Directory-for-Master-Branch-300x193.jpg 300w\" sizes=\"(max-width: 568px) 100vw, 568px\" \/><\/a><figcaption id=\"caption-attachment-37031\" class=\"wp-caption-text\">Create Directory for Master Branch<\/figcaption><\/figure><\/p>\n<p>And in this repository we shall be initializing our Git repository. This shall be done using <code>git init<\/code> command.<\/p>\n<p><figure id=\"attachment_37032\" aria-describedby=\"caption-attachment-37032\" style=\"width: 567px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Initialize-Git-Repository.jpg\"><img decoding=\"async\" class=\"size-full wp-image-37032\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Initialize-Git-Repository.jpg\" alt=\"Initialize Git Repository\" width=\"567\" height=\"366\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Initialize-Git-Repository.jpg 567w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Initialize-Git-Repository-300x194.jpg 300w\" sizes=\"(max-width: 567px) 100vw, 567px\" \/><\/a><figcaption id=\"caption-attachment-37032\" class=\"wp-caption-text\">Initialize Git Repository<\/figcaption><\/figure><div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p>Now we shall be create a new file in this directory with some text.<\/p>\n<p><figure id=\"attachment_37033\" aria-describedby=\"caption-attachment-37033\" style=\"width: 566px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Create-a-new-file.jpg\"><img decoding=\"async\" class=\"size-full wp-image-37033\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Create-a-new-file.jpg\" alt=\"Create a new file\" width=\"566\" height=\"363\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Create-a-new-file.jpg 566w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Create-a-new-file-300x192.jpg 300w\" sizes=\"(max-width: 566px) 100vw, 566px\" \/><\/a><figcaption id=\"caption-attachment-37033\" class=\"wp-caption-text\">Create a new file<\/figcaption><\/figure><\/p>\n<p>Now that we have created our file, we shall be adding it to the repository and then committing the same using <code>git add<\/code> and <code>git commit<\/code> command respectively.<\/p>\n<p><figure id=\"attachment_37034\" aria-describedby=\"caption-attachment-37034\" style=\"width: 570px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Git-Commit.jpg\"><img decoding=\"async\" class=\"size-full wp-image-37034\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Git-Commit.jpg\" alt=\"Git Commit\" width=\"570\" height=\"363\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Git-Commit.jpg 570w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Git-Commit-300x191.jpg 300w\" sizes=\"(max-width: 570px) 100vw, 570px\" \/><\/a><figcaption id=\"caption-attachment-37034\" class=\"wp-caption-text\">Git Commit<\/figcaption><\/figure><\/p>\n<p>Now we shall create a directory where we shall be cloning the Git branch that we created in above steps.<\/p>\n<p><figure id=\"attachment_37035\" aria-describedby=\"caption-attachment-37035\" style=\"width: 566px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Create-Directory-where-Master-shall-be-cloned.jpg\"><img decoding=\"async\" class=\"size-full wp-image-37035\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Create-Directory-where-Master-shall-be-cloned.jpg\" alt=\"Create Directory where Master shall be cloned\" width=\"566\" height=\"366\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Create-Directory-where-Master-shall-be-cloned.jpg 566w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Create-Directory-where-Master-shall-be-cloned-300x194.jpg 300w\" sizes=\"(max-width: 566px) 100vw, 566px\" \/><\/a><figcaption id=\"caption-attachment-37035\" class=\"wp-caption-text\">Create Directory where Master shall be cloned<\/figcaption><\/figure><\/p>\n<p>After this we shall use <code>git clone<\/code> command to clone the master git repository.<\/p>\n<p><figure id=\"attachment_37036\" aria-describedby=\"caption-attachment-37036\" style=\"width: 568px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Clone-Master-Branch.jpg\"><img decoding=\"async\" class=\"size-full wp-image-37036\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Clone-Master-Branch.jpg\" alt=\"Clone Master Branch\" width=\"568\" height=\"362\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Clone-Master-Branch.jpg 568w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Clone-Master-Branch-300x191.jpg 300w\" sizes=\"(max-width: 568px) 100vw, 568px\" \/><\/a><figcaption id=\"caption-attachment-37036\" class=\"wp-caption-text\">Clone Master Branch<\/figcaption><\/figure>[ulp id=&#8217;pzgfvmZhgslwSymm&#8217;]<\/p>\n<p>To see the git remote server configured, we can use command <code>git remote<\/code>. In this, it shall be <i>origin<\/i>.<\/p>\n<p><figure id=\"attachment_37037\" aria-describedby=\"caption-attachment-37037\" style=\"width: 566px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Git-Remote.jpg\"><img decoding=\"async\" class=\"size-full wp-image-37037\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Git-Remote.jpg\" alt=\"Git Remote\" width=\"566\" height=\"360\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Git-Remote.jpg 566w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Git-Remote-300x191.jpg 300w\" sizes=\"(max-width: 566px) 100vw, 566px\" \/><\/a><figcaption id=\"caption-attachment-37037\" class=\"wp-caption-text\">Git Remote<\/figcaption><\/figure><\/p>\n<p>We can also use command <code>git remote -v<\/code> to see the URLs that Git has stored for the shortname to be used when reading and writing to that remote.<\/p>\n<p><figure id=\"attachment_37038\" aria-describedby=\"caption-attachment-37038\" style=\"width: 565px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Git-Remote-details.jpg\"><img decoding=\"async\" class=\"size-full wp-image-37038\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Git-Remote-details.jpg\" alt=\"Git Remote details\" width=\"565\" height=\"364\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Git-Remote-details.jpg 565w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Git-Remote-details-300x193.jpg 300w\" sizes=\"(max-width: 565px) 100vw, 565px\" \/><\/a><figcaption id=\"caption-attachment-37038\" class=\"wp-caption-text\">Git Remote details<\/figcaption><\/figure><\/p>\n<p>Now we shall see <code>git push origin<\/code> command in action. First we shall make some changes to the file in the cloned directory.<\/p>\n<p><figure id=\"attachment_37039\" aria-describedby=\"caption-attachment-37039\" style=\"width: 568px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Make-changes-to-file.jpg\"><img decoding=\"async\" class=\"size-full wp-image-37039\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Make-changes-to-file.jpg\" alt=\"Make changes to file\" width=\"568\" height=\"360\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Make-changes-to-file.jpg 568w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Make-changes-to-file-300x190.jpg 300w\" sizes=\"(max-width: 568px) 100vw, 568px\" \/><\/a><figcaption id=\"caption-attachment-37039\" class=\"wp-caption-text\">Make changes to file<\/figcaption><\/figure><\/p>\n<p>After making changes we shall add and commit file using commands <code>git add<\/code> and <code>git commit<\/code> respectively.<\/p>\n<p><figure id=\"attachment_37040\" aria-describedby=\"caption-attachment-37040\" style=\"width: 567px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Commit-modified-file.jpg\"><img decoding=\"async\" class=\"size-full wp-image-37040\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Commit-modified-file.jpg\" alt=\"Commit modified file\" width=\"567\" height=\"365\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Commit-modified-file.jpg 567w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Commit-modified-file-300x193.jpg 300w\" sizes=\"(max-width: 567px) 100vw, 567px\" \/><\/a><figcaption id=\"caption-attachment-37040\" class=\"wp-caption-text\">Commit modified file<\/figcaption><\/figure><\/p>\n<p>And the final step, we shall use command <code>git push origin<\/code> to send the changes to remote repository.<\/p>\n<p><figure id=\"attachment_37041\" aria-describedby=\"caption-attachment-37041\" style=\"width: 569px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Git-Push-Origin.jpg\"><img decoding=\"async\" class=\"size-full wp-image-37041\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Git-Push-Origin.jpg\" alt=\"Git Push Origin\" width=\"569\" height=\"364\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Git-Push-Origin.jpg 569w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/05\/Git-Push-Origin-300x192.jpg 300w\" sizes=\"(max-width: 569px) 100vw, 569px\" \/><\/a><figcaption id=\"caption-attachment-37041\" class=\"wp-caption-text\">Git Push Origin<\/figcaption><\/figure><\/p>\n<h2>3. Conclusion<\/h2>\n<p>In this example, we learnt the significance of <code>git push origin<\/code> command, what happens if it is not specified and it&#8217;s usage.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this example, we shall understand git push origin command. git push command updates remote references using local references by sending objects necessary to complete the given references. In simple words, git push command updates remote repository with local commits. origin represents remote name where user wants to push the changes. Let&#8217;s understand this command &hellip;<\/p>\n","protected":false},"author":75,"featured_media":27377,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1353],"tags":[1454,1464,1472,1453],"class_list":["post-36726","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-git","tag-distributed-version-control","tag-git-push","tag-git-push-origin","tag-version-control"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Git Push Origin Example - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"In this example, we shall understand git push origin command. git push command updates remote references using local references by sending objects\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-push-origin-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Git Push Origin Example - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"In this example, we shall understand git push origin command. git push command updates remote references using local references by sending objects\" \/>\n<meta property=\"og:url\" content=\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-push-origin-example\/\" \/>\n<meta property=\"og:site_name\" content=\"Examples Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2016-05-11T08:00:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-04-23T11:51:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/git-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Saurabh Arora\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Saurabh Arora\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-push-origin-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-push-origin-example\/\"},\"author\":{\"name\":\"Saurabh Arora\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/5bf4e0274824642c44536b83ddbfaf6c\"},\"headline\":\"Git Push Origin Example\",\"datePublished\":\"2016-05-11T08:00:50+00:00\",\"dateModified\":\"2019-04-23T11:51:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-push-origin-example\/\"},\"wordCount\":481,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-push-origin-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/git-logo.jpg\",\"keywords\":[\"distributed version control\",\"git push\",\"git push origin\",\"version control\"],\"articleSection\":[\"Git\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-push-origin-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-push-origin-example\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-push-origin-example\/\",\"name\":\"Git Push Origin Example - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-push-origin-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-push-origin-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/git-logo.jpg\",\"datePublished\":\"2016-05-11T08:00:50+00:00\",\"dateModified\":\"2019-04-23T11:51:25+00:00\",\"description\":\"In this example, we shall understand git push origin command. git push command updates remote references using local references by sending objects\",\"breadcrumb\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-push-origin-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-push-origin-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-push-origin-example\/#primaryimage\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/git-logo.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/git-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-push-origin-example\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/examples.javacodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Software Development\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/software-development\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Git\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/software-development\/git\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Git Push Origin Example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Examples and Code Snippets\",\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/javacodegeeks\",\"https:\/\/x.com\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/5bf4e0274824642c44536b83ddbfaf6c\",\"name\":\"Saurabh Arora\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/11\/Saurabh-Arora-96x96.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/11\/Saurabh-Arora-96x96.jpg\",\"caption\":\"Saurabh Arora\"},\"description\":\"Saurabh graduated with an engineering degree in Information Technology from YMCA Institute of Engineering, India. He is SCJP, OCWCD certified and currently working as Technical Lead with one of the biggest service based firms and is involved in projects extensively using Java and JEE technologies. He has worked in E-Commerce, Banking and Telecom domain.\",\"sameAs\":[\"http:\/\/www.javacodegeeks.com\/\",\"https:\/\/in.linkedin.com\/in\/saurabh-arora-78674b18\"],\"url\":\"https:\/\/examples.javacodegeeks.com\/author\/saurabh-arora\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Git Push Origin Example - Java Code Geeks","description":"In this example, we shall understand git push origin command. git push command updates remote references using local references by sending objects","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-push-origin-example\/","og_locale":"en_US","og_type":"article","og_title":"Git Push Origin Example - Java Code Geeks","og_description":"In this example, we shall understand git push origin command. git push command updates remote references using local references by sending objects","og_url":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-push-origin-example\/","og_site_name":"Examples Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2016-05-11T08:00:50+00:00","article_modified_time":"2019-04-23T11:51:25+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/git-logo.jpg","type":"image\/jpeg"}],"author":"Saurabh Arora","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Saurabh Arora","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-push-origin-example\/#article","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-push-origin-example\/"},"author":{"name":"Saurabh Arora","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/5bf4e0274824642c44536b83ddbfaf6c"},"headline":"Git Push Origin Example","datePublished":"2016-05-11T08:00:50+00:00","dateModified":"2019-04-23T11:51:25+00:00","mainEntityOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-push-origin-example\/"},"wordCount":481,"commentCount":1,"publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-push-origin-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/git-logo.jpg","keywords":["distributed version control","git push","git push origin","version control"],"articleSection":["Git"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-push-origin-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-push-origin-example\/","url":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-push-origin-example\/","name":"Git Push Origin Example - Java Code Geeks","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-push-origin-example\/#primaryimage"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-push-origin-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/git-logo.jpg","datePublished":"2016-05-11T08:00:50+00:00","dateModified":"2019-04-23T11:51:25+00:00","description":"In this example, we shall understand git push origin command. git push command updates remote references using local references by sending objects","breadcrumb":{"@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-push-origin-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-push-origin-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-push-origin-example\/#primaryimage","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/git-logo.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/git-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-push-origin-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/examples.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Software Development","item":"https:\/\/examples.javacodegeeks.com\/category\/software-development\/"},{"@type":"ListItem","position":3,"name":"Git","item":"https:\/\/examples.javacodegeeks.com\/category\/software-development\/git\/"},{"@type":"ListItem","position":4,"name":"Git Push Origin Example"}]},{"@type":"WebSite","@id":"https:\/\/examples.javacodegeeks.com\/#website","url":"https:\/\/examples.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Examples and Code Snippets","publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/examples.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/examples.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/5bf4e0274824642c44536b83ddbfaf6c","name":"Saurabh Arora","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/11\/Saurabh-Arora-96x96.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/11\/Saurabh-Arora-96x96.jpg","caption":"Saurabh Arora"},"description":"Saurabh graduated with an engineering degree in Information Technology from YMCA Institute of Engineering, India. He is SCJP, OCWCD certified and currently working as Technical Lead with one of the biggest service based firms and is involved in projects extensively using Java and JEE technologies. He has worked in E-Commerce, Banking and Telecom domain.","sameAs":["http:\/\/www.javacodegeeks.com\/","https:\/\/in.linkedin.com\/in\/saurabh-arora-78674b18"],"url":"https:\/\/examples.javacodegeeks.com\/author\/saurabh-arora\/"}]}},"_links":{"self":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/36726","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/users\/75"}],"replies":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=36726"}],"version-history":[{"count":0,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/36726\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media\/27377"}],"wp:attachment":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=36726"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=36726"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=36726"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}