{"id":27130,"date":"2015-09-24T11:00:17","date_gmt":"2015-09-24T08:00:17","guid":{"rendered":"http:\/\/examples.javacodegeeks.com\/?p=27130"},"modified":"2019-04-23T14:57:41","modified_gmt":"2019-04-23T11:57:41","slug":"git-hello-world-example","status":"publish","type":"post","link":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-hello-world-example\/","title":{"rendered":"Git &#8220;Hello World&#8221; Example"},"content":{"rendered":"<p>In this example we shall show you how to start with <strong>Git<\/strong>. Git is a Version Control System&nbsp;(VCS) like CVS or Subversion but with one big difference it is not central repository, it is distributed.<\/p>\n<p>First, we shall install git. You can download the installer to any O.S. from git-scm site <a href=\"http:\/\/git-scm.com\/download\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>.&nbsp;Also, we will need an GitHub account in order to complete some steps in these example.<\/p>\n<p><strong>Note:&nbsp;<\/strong>We should take into account that the latest version is not available for all O.S at the same time.<\/p>\n<h2>1. History<\/h2>\n<ul>\n<li>Started at 2005<\/li>\n<li>Created by Linus Tolvards<\/li>\n<li>Written in Perl and C<\/li>\n<\/ul>\n<h2>2. Advantages<\/h2>\n<ul>\n<li>Allow different topologies (centralized, hierarchical, distributed)<\/li>\n<li>Backup are easy<\/li>\n<li>Reliable branching\/merging<\/li>\n<li>Full local history<\/li>\n<\/ul>\n<h2>3. Git Protocols<\/h2>\n<ul>\n<li>HTTP\/HTTPS<\/li>\n<li>GIT<\/li>\n<li>SSH<\/li>\n<li>File<\/li>\n<\/ul>\n<h2>4. Example<\/h2>\n<p>Before to start with the example, we need to setup git after the installation.&nbsp;There are three configuration levels (system, global, local). For more information, visit <a href=\"https:\/\/git-scm.com\/book\/en\/v2\/Customizing-Git-Git-Configuration\">Git Configuration Section<\/a>.<\/p>\n<pre class=\"brush:bash\">git config --global user.name \"[name]\"\ngit config --global user.email \"[email address]\"\n<\/pre>\n<ol>\n<li>Create <strong>hello-world<\/strong> directory and make your first git local repository.\n<pre class=\"brush:bash\">mkdir hello-world\ncd hello-world\ngit init\n<\/pre>\n<p>By default, <strong>master<\/strong> is the name of branch.<\/li>\n<li>Create a <strong>README.md<\/strong> file and add your first commit using <code>git commit --message<\/code> or <code>git commit -m<\/code>.\n<pre class=\"brush:bash\">echo \"Lorem ipsum dolor sit amet, eros maiestatis ei mel, utroque accumsan no pri. Ne his vocent tractatos, an soluta mollis sea. Delicata persequeris ne mei, cum no commodo detracto. Eu eam habemus lucilius. Facer sonet lobortis id pri, delectus fabellas id cum. Cum ex iuvaret inermis conclusionemque.\" &gt;&gt; README.md\ngit add README.md\ngit commit -m \"Initial commit\"\n<\/pre>\n<p>File status in git repositories:<\/p>\n<ul>\n<li>Untracked, initial status for new files.<\/li>\n<li>Staged, after <code>git add<\/code> execution.<\/li>\n<li>Unmodified, once <code>git commit<\/code> command is performed.<\/li>\n<li>Modified, files committed have been edited.<\/li>\n<\/ul>\n<\/li>\n<li>Create a <a href=\"https:\/\/github.com\/\">GitHub<\/a> account and create your repository.<br \/>\n<figure id=\"attachment_27434\" aria-describedby=\"caption-attachment-27434\" style=\"width: 800px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/create-github-repository-1.jpg\"><img decoding=\"async\" class=\"size-full wp-image-27434\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/create-github-repository-1.jpg\" alt=\"Create GitHub Repository 1\" width=\"800\" height=\"509\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/create-github-repository-1.jpg 800w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/create-github-repository-1-300x191.jpg 300w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/a><figcaption id=\"caption-attachment-27434\" class=\"wp-caption-text\">Create GitHub Repository 1<\/figcaption><\/figure><br \/>\n<figure id=\"attachment_27435\" aria-describedby=\"caption-attachment-27435\" style=\"width: 800px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/create-github-repository-2.jpg\"><img decoding=\"async\" class=\"size-full wp-image-27435\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/create-github-repository-2.jpg\" alt=\"Create GitHub Repository 2\" width=\"800\" height=\"509\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/create-github-repository-2.jpg 800w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/create-github-repository-2-300x191.jpg 300w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/a><figcaption id=\"caption-attachment-27435\" class=\"wp-caption-text\">Create GitHub Repository 2<\/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><figure id=\"attachment_27436\" aria-describedby=\"caption-attachment-27436\" style=\"width: 800px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/create-github-repository-3.jpg\"><img decoding=\"async\" class=\"size-full wp-image-27436\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/create-github-repository-3.jpg\" alt=\"Create GitHub Repository 3\" width=\"800\" height=\"509\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/create-github-repository-3.jpg 800w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/create-github-repository-3-300x191.jpg 300w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/a><figcaption id=\"caption-attachment-27436\" class=\"wp-caption-text\">Create GitHub Repository 3<\/figcaption><\/figure><\/li>\n<li>At this time, all changes are in our local repository but before to push local changes to the remote repository we need to add the remote url in the local repository. The first command is <code>git remote --verbose<\/code> or <code>git remote -v<\/code> show us the list of remote repositories associated but in this case is empty. Second command is used to add remote repositories.\n<pre class=\"brush:bash\">git remote -v\ngit remote add origin git@github.com:eddumelendez\/hello-world.git\n<\/pre>\n<p>After that, we can run <code>git remote -v<\/code> and we will see something like this:<\/p>\n<pre class=\"brush:bash\">origin git@github.com:eddumelendez\/hello-world.git (fetch)\norigin\tgit@github.com:eddumelendez\/hello-world.git (push)\n<\/pre>\n<\/li>\n<li>Now, our local repository has communication with the remote repository. This allow us to push local changes to the remote repository on GitHub.\n<pre class=\"brush:bash\">git push origin master\n<\/pre>\n<\/li>\n<li>Let&#8217;s create a new branch named <strong>development<\/strong> and add <strong>CONTRIBUTION.md<\/strong> file.\n<pre class=\"brush:bash\">git branch development\ngit checkout development\necho \"Contribution\" &gt;&gt; CONTRIBUTION.md\n<\/pre>\n<p>We can use just one command <code>git checkout -b development<\/code> instead <code>git branch development<\/code> and <code>git checkout development<\/code>.<\/p>\n<p>In order to see the list of branches we can use <code>git branch -a<\/code>, the result must be:<\/p>\n<pre class=\"brush:bash\">* development\nmaster\n<\/pre>\n<p>(*) means that we are working in that branch.<\/li>\n<li>Commit new file to the local repository in <strong>development<\/strong> branch.\n<pre class=\"brush:bash\">git add CONTRIBUTION.md\ngit commit -m \"Add CONTRIBUTION.md file\"\n<\/pre>\n<\/li>\n<li>Let&#8217;s review the log. Our <strong>development<\/strong> branch must have one additional commit to <strong>master<\/strong>.\n<pre class=\"brush:bash\">git log --oneline\n<\/pre>\n<p>Terminal will display:<\/p>\n<pre class=\"brush:bash\">11251d9 Add CONTRIBUTION.md file\na466c08 Initial commit\n<\/pre>\n<\/li>\n<li>In order to see the differences among our branches we will use <code>git diff<\/code> command\n<pre class=\"brush:bash\">git diff master.. development<\/pre>\n<p>In the terminal, we can see that there are a new file with content text Contribution.<\/p>\n<pre class=\"brush:bash\">diff --git a\/CONTRIBUTION.d b\/CONTRIBUTION.d\nnew file mode 100644\nindex 0000000..e07fa82\n--- \/dev\/null\n+++ b\/CONTRIBUTION.d\n@@ -0,0 +1 @@\n+Contribution\n<\/pre>\n<\/li>\n<li>Finally, since we have been working in a different branch (development). We need to merge these changes in the main branch (master). Now, we will use <code>git merge<\/code> command.\n<pre class=\"brush:bash\">git checkout master\ngit merge development\n<\/pre>\n<p>Now, we will create another branch from master and will make changes to solve conflicts in merge.<\/li>\n<li>Create <strong>refactor<\/strong> branch from <strong>master<\/strong>.\n<pre class=\"brush:bash\">git checkout -b refactor<\/pre>\n<\/li>\n<li>Edit <strong>README.md<\/strong> file, we are going to change word <strong>utroque<\/strong> to <strong>refactor.<\/strong><\/li>\n<li>Back to the master branch and edit <strong>README.md<\/strong> file, we are going to change word <strong>utroque<\/strong> to <strong>master<\/strong>.\n<pre class=\"brush:bash\">git checkout master<\/pre>\n<\/li>\n<li>Let see the difference among master and refactor\n<pre class=\"brush:bash\">git checkout refactor\ngit diff master.. refactor\n<\/pre>\n<p>The output is:[ulp id=&#8217;pzgfvmZhgslwSymm&#8217;]<\/p>\n<pre class=\"brush:bash\">diff --git a\/README.md b\/README.md\nindex 642ff12..ba22bb0 100644\n--- a\/README.md\n+++ b\/README.md\n@@ -1 +1 @@\n-Lorem ipsum dolor sit amet, eros maiestatis ei mel, master accumsan no pri. Ne his vocent tractatos, an soluta mollis sea. Delicata persequeris ne mei, cum no commodo detracto. Eu eam habemus lucilius. Facer sonet lobortis id pri, delectus fabellas id cum. Cum ex iuvaret inermis conclusionemque.\n+Lorem ipsum dolor sit amet, eros maiestatis ei mel, refactor accumsan no pri. Ne his vocent tractatos, an soluta mollis sea. Delicata persequeris ne mei, cum no commodo detracto. Eu eam habemus lucilius. Facer sonet lobortis id pri, delectus fabellas id cum. Cum ex iuvaret inermis conclusionemque.\n<\/pre>\n<p>As we can see, there are conflicts between <strong>README.md<\/strong> files. Now, we will solve these conflicts in our merge process.<\/p>\n<pre class=\"brush:bash\">&lt;&lt;&lt;&lt;&lt;&lt;&lt; HEAD Lorem ipsum dolor sit amet, eros maiestatis ei mel, master accumsan no pri. Ne his vocent tractatos, an soluta mollis sea. Delicata persequeris ne mei, cum no commodo detracto. Eu eam habemus lucilius. Facer sonet lobortis id pri, delectus fabellas id cum. Cum ex iuvaret inermis conclusionemque.\n======= Lorem ipsum dolor sit amet, eros maiestatis ei mel, refactor accumsan no pri. Ne his vocent tractatos, an soluta mollis sea. Delicata persequeris ne mei, cum no commodo detracto. Eu eam habemus lucilius. Facer sonet lobortis id pri, delectus fabellas id cum. Cum ex iuvaret inermis conclusionemque. &gt;&gt;&gt;&gt;&gt;&gt;&gt; refactor\n<\/pre>\n<\/li>\n<li>In order to proceed with merge. We need to locate at the branch we want to merge changes, in our case <strong>master<\/strong> is that branch. Now, we will perform <code>git merge<\/code>\n<pre class=\"brush:bash\">git checkout master\ngit merge refactor<\/pre>\n<p>Now, we are going to work &nbsp;with the remote repository. You can clone the repository created on GitHub which was created in previous steps using <code>git clone<\/code>:<\/p>\n<pre class=\"brush:bash\">git clone&nbsp;https:\/\/github.com\/eddumelendez\/hello-world.git hello-world-copy\n<\/pre>\n<p>This working copy is out-of-date. But, imagine you have been working in a new feature in the master branch. There are two way to update. Using a rebase or merging changes.<\/li>\n<\/ol>\n<h3>4.1 Rebase<\/h3>\n<pre class=\"brush:bash\">git pull --rebase origin master\ngit log --oneline\n<\/pre>\n<p>As you can see, your last commit is on the top. So, <code>git pull --rebase<\/code> have reallocated your commit. You can have some conflicts in the rebase process and there are three commands <code>git rebase --continue<\/code>, apply changes to the next commit,<code>git rebase --skip<\/code>, ignore the current commit and, <code>git rebase --abort<\/code>, abort all rebase process.<\/p>\n<h3>4.2 Merge<\/h3>\n<pre class=\"brush:bash\">git fetch origin master\ngit merge origin\/master\n<\/pre>\n<h2>5. Resources<\/h2>\n<ul>\n<li>Git book [<a href=\"https:\/\/git-scm.com\/book\/\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>]<\/li>\n<li>Git cheatsheet [<a href=\"https:\/\/training.github.com\/kit\/downloads\/github-git-cheat-sheet.pdf\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>]<\/li>\n<\/ul>\n<h2>6. Download the source code<\/h2>\n<p>This was an example about Git &#8220;Hello World&#8221;.<\/p>\n<div class=\"download\"><strong>Download<\/strong><br \/>\nYou can download the source code of this example here: <a class=\"ext-link\" title=\"\" href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/git-hello-world-example.zip\" rel=\"external nofollow\"><strong>Git_Hello_World.zip<\/strong><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this example we shall show you how to start with Git. Git is a Version Control System&nbsp;(VCS) like CVS or Subversion but with one big difference it is not central repository, it is distributed. First, we shall install git. You can download the installer to any O.S. from git-scm site here.&nbsp;Also, we will need &hellip;<\/p>\n","protected":false},"author":58,"featured_media":27377,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1353],"tags":[1203],"class_list":["post-27130","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-git","tag-git"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Git &quot;Hello World&quot; Example - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"In this example we shall show you how to start with Git. Git is a Version Control System&nbsp;(VCS) like CVS or Subversion but with one big difference it\" \/>\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-hello-world-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Git &quot;Hello World&quot; Example - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"In this example we shall show you how to start with Git. Git is a Version Control System&nbsp;(VCS) like CVS or Subversion but with one big difference it\" \/>\n<meta property=\"og:url\" content=\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-hello-world-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=\"2015-09-24T08:00:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-04-23T11:57:41+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=\"Eddu Melendez\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@eddumelendez\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Eddu Melendez\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 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-hello-world-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-hello-world-example\/\"},\"author\":{\"name\":\"Eddu Melendez\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/5f3392b0e6e58390b9565c8ca1680a69\"},\"headline\":\"Git &#8220;Hello World&#8221; Example\",\"datePublished\":\"2015-09-24T08:00:17+00:00\",\"dateModified\":\"2019-04-23T11:57:41+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-hello-world-example\/\"},\"wordCount\":734,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-hello-world-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/git-logo.jpg\",\"keywords\":[\"git\"],\"articleSection\":[\"Git\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-hello-world-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-hello-world-example\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-hello-world-example\/\",\"name\":\"Git \\\"Hello World\\\" Example - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-hello-world-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-hello-world-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/git-logo.jpg\",\"datePublished\":\"2015-09-24T08:00:17+00:00\",\"dateModified\":\"2019-04-23T11:57:41+00:00\",\"description\":\"In this example we shall show you how to start with Git. Git is a Version Control System&nbsp;(VCS) like CVS or Subversion but with one big difference it\",\"breadcrumb\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-hello-world-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-hello-world-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-hello-world-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-hello-world-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 &#8220;Hello World&#8221; 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\/5f3392b0e6e58390b9565c8ca1680a69\",\"name\":\"Eddu Melendez\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/08\/Eddu-Melendez-96x96.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/08\/Eddu-Melendez-96x96.jpg\",\"caption\":\"Eddu Melendez\"},\"description\":\"Eddu is a Peruvian software engineer. He is interested in Java, Spring Framework and Mule ESB. He is also very enthusiastic to learn new stuff.\",\"sameAs\":[\"http:\/\/eddumelendez.github.io\/\",\"https:\/\/pe.linkedin.com\/in\/eddumelendez\",\"https:\/\/x.com\/eddumelendez\"],\"url\":\"https:\/\/examples.javacodegeeks.com\/author\/eddu-melendez\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Git \"Hello World\" Example - Java Code Geeks","description":"In this example we shall show you how to start with Git. Git is a Version Control System&nbsp;(VCS) like CVS or Subversion but with one big difference it","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-hello-world-example\/","og_locale":"en_US","og_type":"article","og_title":"Git \"Hello World\" Example - Java Code Geeks","og_description":"In this example we shall show you how to start with Git. Git is a Version Control System&nbsp;(VCS) like CVS or Subversion but with one big difference it","og_url":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-hello-world-example\/","og_site_name":"Examples Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2015-09-24T08:00:17+00:00","article_modified_time":"2019-04-23T11:57:41+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":"Eddu Melendez","twitter_card":"summary_large_image","twitter_creator":"@eddumelendez","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Eddu Melendez","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-hello-world-example\/#article","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-hello-world-example\/"},"author":{"name":"Eddu Melendez","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/5f3392b0e6e58390b9565c8ca1680a69"},"headline":"Git &#8220;Hello World&#8221; Example","datePublished":"2015-09-24T08:00:17+00:00","dateModified":"2019-04-23T11:57:41+00:00","mainEntityOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-hello-world-example\/"},"wordCount":734,"commentCount":0,"publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-hello-world-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/git-logo.jpg","keywords":["git"],"articleSection":["Git"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-hello-world-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-hello-world-example\/","url":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-hello-world-example\/","name":"Git \"Hello World\" Example - Java Code Geeks","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-hello-world-example\/#primaryimage"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-hello-world-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/git-logo.jpg","datePublished":"2015-09-24T08:00:17+00:00","dateModified":"2019-04-23T11:57:41+00:00","description":"In this example we shall show you how to start with Git. Git is a Version Control System&nbsp;(VCS) like CVS or Subversion but with one big difference it","breadcrumb":{"@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-hello-world-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-hello-world-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-hello-world-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-hello-world-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 &#8220;Hello World&#8221; 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\/5f3392b0e6e58390b9565c8ca1680a69","name":"Eddu Melendez","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/08\/Eddu-Melendez-96x96.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/08\/Eddu-Melendez-96x96.jpg","caption":"Eddu Melendez"},"description":"Eddu is a Peruvian software engineer. He is interested in Java, Spring Framework and Mule ESB. He is also very enthusiastic to learn new stuff.","sameAs":["http:\/\/eddumelendez.github.io\/","https:\/\/pe.linkedin.com\/in\/eddumelendez","https:\/\/x.com\/eddumelendez"],"url":"https:\/\/examples.javacodegeeks.com\/author\/eddu-melendez\/"}]}},"_links":{"self":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/27130","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\/58"}],"replies":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=27130"}],"version-history":[{"count":0,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/27130\/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=27130"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=27130"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=27130"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}