{"id":39942,"date":"2016-08-08T15:00:31","date_gmt":"2016-08-08T12:00:31","guid":{"rendered":"http:\/\/examples.javacodegeeks.com\/?p=39942"},"modified":"2019-04-23T14:25:26","modified_gmt":"2019-04-23T11:25:26","slug":"git-tree-viewer-example","status":"publish","type":"post","link":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-tree-viewer-example\/","title":{"rendered":"Git Tree Viewer Example"},"content":{"rendered":"<p>As we know, <code>Git<\/code> has been popularly used by software developers recently. In comparison with <code>SVN<\/code> (Apache Subversion) and <code>CVS<\/code> (Concurrent Version System), <code>Git<\/code> is more powerful.<\/p>\n<p>That lies in its properties of distributed nature, fast operation and branch handling mechanism. In addition, it&#8217;s very convenient for multiple workers to work together with <code>Git<\/code>. Especially with the usage of <code>Github<\/code>, it makes cooperation easier than ever.<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;\n<\/p>\n<h2>1. Introduction<\/h2>\n<p>As a version control platform, we cannot say anything without versions. Basically, <code>Git<\/code> is powerful for its version management. With the versions expand, they form a structure similar to a tree. And in this article, we focus on the tree structure and it&#8217;s viewer.<\/p>\n<p>In the following example, all are shown in MacOS EI Capitan Version 10.11.5 and the <code>Git<\/code> version is 2.7.4. In addition, you may want to have GitKraken 1.5.2.<\/p>\n<h2>2. Git workflow<\/h2>\n<h3>2.1 Basic settings<\/h3>\n<p>Before we move forward, make sure you&#8217;ve download Git and install it. In addition, make sure you have a Github account. Furthermore, be sure that you&#8217;ve set up the global configuration for both of them. All these download and setup issues could refer to <a href=\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-clone-repository-example\/\">my previous posts on Git<\/a>.<\/p>\n<p>Then, open the terminal. You can check the&nbsp;<code>Git<\/code>&nbsp;version via command&nbsp;<code>git --version<\/code>.&nbsp;Mine is like below after the version checking command:<\/p>\n<pre class=\"brush:bash\">WXMs-MacBook-Pro:~ WXM$ git --version\ngit version 2.7.4 (Apple Git-66)\n<\/pre>\n<h3>2.2 Git repository<\/h3>\n<p>Then, we need to get used to some basic&nbsp;concepts about repository. In&nbsp;<code>Git<\/code>, there will be three repositories or areas. If we consider the usage of&nbsp;<code>Github<\/code>, then we need to understand the remote repository. To make it clear, we&nbsp;use the following flow to demonstrate how the git works.<\/p>\n<p><figure id=\"attachment_36668\" aria-describedby=\"caption-attachment-36668\" style=\"width: 603px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/04\/gitflow.jpg\"><img decoding=\"async\" class=\"wp-image-36668 size-full\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/04\/gitflow.jpg\" alt=\"gitflow\" width=\"603\" height=\"524\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/04\/gitflow.jpg 603w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/04\/gitflow-300x261.jpg 300w\" sizes=\"(max-width: 603px) 100vw, 603px\" \/><\/a><figcaption id=\"caption-attachment-36668\" class=\"wp-caption-text\">git repository and workflow<\/figcaption><\/figure><\/p>\n<ul>\n<li><strong>Workspace<\/strong>: it\u2019s the place where you see in your computer system, or the directory where you check out your files. Files in the workspace could be added to the Git by using&nbsp;<code>git add<\/code>&nbsp;command. Basically it could be any folders in your computer.<\/li>\n<li><strong>Index<\/strong>: it\u2019s also called stating area. It\u2019s an invisible space where you can add files that you want to commit. To add commit, you can use&nbsp;<code>git commit<\/code>&nbsp;command.<\/li>\n<li><strong>Local repository<\/strong>: it\u2019s also an invisible repository. Actually it\u2019s stored in the .git folder, which is hidden in the folder you created.<\/li>\n<li><strong>Remote repository<\/strong>: this could be another computer, or it could be the server of others, such as Github, which we can consider it as a remote repository. To access to the remote repository, git push or&nbsp;<code>git pull<\/code>&nbsp;could be used.<\/li>\n<\/ul>\n<h3>2.3 Other concepts<\/h3>\n<p>In addition, we also need to be familiar with some other common concepts in&nbsp;<code>Git<\/code>.<\/p>\n<ul>\n<li><strong>Branch<\/strong>: it\u2019s used to create another line of code. Usually it\u2019s for creating another new feature. Once the new feature has completed, it can be merged back in the master branch.<\/li>\n<li><strong>Master Branch<\/strong>: we can consider it as the main branch\/code to work on. You can add other branches if needed. But the whole project can only have one master branch.<\/li>\n<li><strong>Commit<\/strong>: it holds the current state of the repository. It can be considered as a node of a linked-list. Every commit has a pointer to the parent commit object. You can go back to the parent commit object by changing the pointer.<\/li>\n<li><strong>HEAD<\/strong>: it is the pointer to the most recent commit on the current branch. It\u2019s actually a hash value of current commit, which is calculated by SHA-1 hash on a file with a hash value of 160 bits that uniquely identifies the contents of the file.<\/li>\n<\/ul>\n<h2>3. Git tree viewer<\/h2>\n<p>In this part, I&#8217;ll introduce the concept of <code>Git<\/code> tree. Meanwhile, I&#8217;ll show you the GUI viewer for the tree structure.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p>In <code>Git<\/code>, we can connect our local repository with remote repository, like <code>Github<\/code>. The most-often used <code>Git<\/code> commands are <code>git add<\/code>, <code>git commit<\/code> and <code>git push<\/code>. <code>git add<\/code> command is to add file contents to the index repository. <code>git commit<\/code> is used for recording changes to the repository. And <code>git push<\/code> is for uploading the local file to <code>Github<\/code>.<\/p>\n<p>Normally, when you make changes to your local file, you may go through the whole process of git-add-commit-push. And this will update the changes and save it in <code>Github<\/code>. Along the whole process, it forms a tree structure. The tree start from the original file you created. Here we can call it version 0 of this file. Then, it&#8217;ll follow up to version 1, 2, 3 etc, with every change.<\/p>\n<h3>3.1 A simple Git example<\/h3>\n<p>To make it clear, we create a very simple text file and manipulate with it. Firstly, we create a folder called GitTreeViewExample. Meanwhile, we create a txt file named README. Then we add content of &#8220;Hi there!&#8221; in the txt file.<\/p>\n<pre class=\"brush:bash\">WXMs-MacBook-Pro:~ WXM$ cd Documents\/JCG\/\nWXMs-MacBook-Pro:JCG WXM$ ls\nGitDiffExample\tGitLearning\tGit_repository\nWXMs-MacBook-Pro:JCG WXM$ mkdir GitTreeViewExample\nWXMs-MacBook-Pro:JCG WXM$ cd GitTreeViewExample\/\nWXMs-MacBook-Pro:GitTreeViewExample WXM$ cat README.txt\nHi there!\n<\/pre>\n<p>After this, we run the command <code>git init<\/code> to initialize the project\/folder.<\/p>\n<pre class=\"brush:bash\">WXMs-MacBook-Pro:GitTreeViewExample WXM$ git init\nInitialized empty Git repository in \/Users\/WXM\/Documents\/JCG\/GitTreeViewExample\/.git\/\n<\/pre>\n<p>Then, we check the status of the whole project:<\/p>\n<pre class=\"brush:bash\">WXMs-MacBook-Pro:GitTreeViewExample WXM$ git status\nOn branch master\nInitial commit\nUntracked files:\n  (use \"git add ...\" to include in what will be committed)\n\tREADME.txt\nnothing added to commit but untracked files present (use \"git add\" to track)\n<\/pre>\n<p>Furthermore, you need to create a repository under your <code>Github<\/code> account. Here, we name it the same as the project name GitTreeViewExample. Then you need to get the link for that repository and push you local changes to the remote repository.<\/p>\n<pre class=\"brush:bash\">WXMs-MacBook-Pro:GitTreeViewExample WXM$ git remote add origin https:\/\/github.com\/wuxiaomin98\/GitTreeViewExample.git\nWXMs-MacBook-Pro:GitTreeViewExample WXM$ git push -u origin master\nCounting objects: 3, done.\nWriting objects: 100% (3\/3), 225 bytes | 0 bytes\/s, done.\nTotal 3 (delta 0), reused 0 (delta 0)\nTo https:\/\/github.com\/wuxiaomin98\/GitTreeViewExample.git\n * [new branch]      master -&gt; master\nBranch master set up to track remote branch master from origin.\nWXMs-MacBook-Pro:GitTreeViewExample WXM$ git status\nOn branch master\nYour branch is up-to-date with 'origin\/master'.\nnothing to commit, working directory clean\n<\/pre>\n<p>Then, we make changes to the txt file, adding the name. It shows like below:<\/p>\n<pre class=\"brush:bash\">WXMs-MacBook-Pro:GitTreeViewExample WXM$ cat README.txt\nHi there!\n\nI'm Steve.\n<\/pre>\n<p>Afterwords, push the changes to the remote repository.<\/p>\n<pre class=\"brush:bash\">WXMs-MacBook-Pro:GitTreeViewExample WXM$ git add README.txt\nWXMs-MacBook-Pro:GitTreeViewExample WXM$ git commit -m \"add name\"\n[master 2307d89] add name\n 1 file changed, 2 insertions(+)\nWXMs-MacBook-Pro:GitTreeViewExample WXM$ git push\nCounting objects: 3, done.\nWriting objects: 100% (3\/3), 260 bytes | 0 bytes\/s, done.\nTotal 3 (delta 0), reused 0 (delta 0)\nTo https:\/\/github.com\/wuxiaomin98\/GitTreeViewExample.git\n   f615f6d..2307d89  master -&gt; master\n<\/pre>\n<h3>3.2 Git tree<\/h3>\n<p>To make a <code>Git<\/code> tree structure, you may want to make multiple different changes. This includes making changes to original file. Also, you may want to create different branches.<\/p>\n<p>Each time you make the changes, you can use the <code>git status<\/code> to check the status. Then you may get some hints, like to add and commit the changes. This could be like below:<\/p>\n<pre class=\"brush:bash\">WXMs-MacBook-Pro:GitTreeViewExample WXM$ git status\nOn branch master\nYour branch is up-to-date with 'origin\/master'.\nChanges not staged for commit:\n  (use \"git add ...\" to update what will be committed)\n  (use \"git checkout -- ...\" to discard changes in working directory)\n\n\tmodified:   README.txt\n\nno changes added to commit (use \"git add\" and\/or \"git commit -a\")\nWXMs-MacBook-Pro:GitTreeViewExample WXM$ git add README.txt\nWXMs-MacBook-Pro:GitTreeViewExample WXM$ git commit -m \"nice to meet you\"\n[master 0534eff] nice to meet you\n 1 file changed, 3 insertions(+), 1 deletion(-)\nWXMs-MacBook-Pro:GitTreeViewExample WXM$ git push\nCounting objects: 3, done.\nWriting objects: 100% (3\/3), 290 bytes | 0 bytes\/s, done.\nTotal 3 (delta 0), reused 0 (delta 0)\nTo https:\/\/github.com\/wuxiaomin98\/GitTreeViewExample.git\n   2307d89..0534eff  master -&gt; master\nWXMs-MacBook-Pro:GitTreeViewExample WXM$ git status\nOn branch master\nYour branch is up-to-date with 'origin\/master'.\nnothing to commit, working directory clean\n<\/pre>\n<p>Finally, I get something like below.[ulp id=&#8217;pzgfvmZhgslwSymm&#8217;]<\/p>\n<pre class=\"brush:bash\">WXMs-MacBook-Pro:GitTreeViewExample WXM$ cat README.txt\nHi there!\n\nI'm Steve.\n\nNice to meet you here.\n\nIt's easy to use Git.\n\nI'm in a test branch.\n\nI'm in a master branch now.\n<\/pre>\n<p>Furthermore, you can get through <code>git log<\/code> command.<\/p>\n<pre class=\"brush:bash\">WXMs-MacBook-Pro:GitTreeViewExample WXM$ git log\ncommit c0dcbb248590501db40ba286e52ec4ca6aa2d372\nAuthor: Jun \nDate:   Fri Aug 5 22:08:06 2016 -0500\n\n    master branch\n\ncommit a439d39a9f5e7ac4274b55a0923f0e6d3716c971\nAuthor: Jun \nDate:   Fri Aug 5 22:03:13 2016 -0500\n\n    a new branch test\n\ncommit 94de23feeda610e1b8e15e66e2d5712ccb547189\nAuthor: Jun \nDate:   Fri Aug 5 22:00:22 2016 -0500\n\n    Easy to learn git\n\ncommit 0534eff571470c409ad16102807796619899f63a\nAuthor: Jun \nDate:   Fri Aug 5 21:56:15 2016 -0500\n\n    nice to meet you\n<\/pre>\n<h3>3.3 Git tree viewer &#8211; through default Git command<\/h3>\n<p>To get the tree viewer of your project, one way is to use the command <code>git log<\/code>. Specifically, you can use the &#8211;graph add-on with the command. You can check out this like below:<\/p>\n<pre class=\"brush:bash\">WXMs-MacBook-Pro:GitTreeViewExample WXM$ git log --graph --full-history --all --pretty=format:\"%h%x09%d%x20%s\"\n* b9f2630        (HEAD -&gt; new_branch, origin\/new_branch) another branch\n* c0dcbb2        (origin\/master, master) master branch\n* a439d39        (origin\/branch_test, branch_test) a new branch test\n* 94de23f        Easy to learn git\n* 0534eff        nice to meet you\n* 2307d89        add name\n* f615f6d        first readme file\n<\/pre>\n<p>In addition, to make it simple, you can just use the command <code>git log --graph --oneline<\/code>. And this will have all updates to be in one line.<\/p>\n<pre class=\"brush:bash\">WXMs-MacBook-Pro:GitTreeViewExample WXM$ git log --graph --oneline\n* b9f2630 another branch\n* c0dcbb2 master branch\n* a439d39 a new branch test\n* 94de23f Easy to learn git\n* 0534eff nice to meet you\n* 2307d89 add name\n* f615f6d first readme file\n<\/pre>\n<p>Notice here, it seems there&#8217;s no tree structure showing up. The reason for this is that I&#8217;m the only one to work on this project. Therefore, the tree is just one consecutive line up. However, if you have more than one person to work on this, you&#8217;ll see very structural format, just like a tree.<\/p>\n<h3>3.4 Git tree viewer &#8211; through other Git GUI software<\/h3>\n<p>Sometimes, you may be tired by the command line operation. If that&#8217;s the case, probably you may take a look at the GUI for <code>Git<\/code>. And there&#8217;re various options for your choice, like GitX, Gitbox, SmartGit, GitKraken etc. For more other softwares, you can refer to the <a href=\"https:\/\/git-scm.com\/download\/gui\/linux\">Git GUI page<\/a>. All these provide quite powerful GUI interface for <code>Git<\/code>.<\/p>\n<p>Here, I choose GitKraken to show the tree structure. First of all, it&#8217;s free. Then, it&#8217;s cross-platform and could be used in Windows, MacOS and Linux. Finally, it&#8217;s easy to operate on it and connect it with both <code>Git<\/code> and <code>Github<\/code>.<\/p>\n<p>You can download it from the <a href=\"https:\/\/www.gitkraken.com\/\">official site<\/a>. Then, install it. Open the GitKraken, you can connect your local repository with your <code>Github<\/code> account. You can go to preferences\/authentication\/Github.com. Then input your <code>Github<\/code> account user name and password. In the end, you may see successful connection like below:<\/p>\n<p><figure id=\"attachment_39997\" aria-describedby=\"caption-attachment-39997\" style=\"width: 868px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/Git-Github.jpg\"><img decoding=\"async\" class=\"wp-image-39997 size-full\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/Git-Github.jpg\" alt=\"Git &amp; Github\" width=\"868\" height=\"698\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/Git-Github.jpg 868w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/Git-Github-300x241.jpg 300w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/Git-Github-768x618.jpg 768w\" sizes=\"(max-width: 868px) 100vw, 868px\" \/><\/a><figcaption id=\"caption-attachment-39997\" class=\"wp-caption-text\">GitKraken &amp; Github connection<\/figcaption><\/figure><\/p>\n<p>One feature for GitKraken is that it can scan the <code>Git<\/code> repository on your local machine. This could be very convenient. Then what you need to do is to go to specific project, which you want to work on.<\/p>\n<p>For example, coming back to our GitViewExample. You can see all the information for each commit like below:<\/p>\n<p><figure id=\"attachment_39998\" aria-describedby=\"caption-attachment-39998\" style=\"width: 860px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/rsz_gitkraken_tree_viewer.jpg\"><img decoding=\"async\" class=\"wp-image-39998 size-full\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/rsz_gitkraken_tree_viewer.jpg\" alt=\"rsz_gitkraken_tree_viewer\" width=\"860\" height=\"265\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/rsz_gitkraken_tree_viewer.jpg 860w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/rsz_gitkraken_tree_viewer-300x92.jpg 300w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/rsz_gitkraken_tree_viewer-768x237.jpg 768w\" sizes=\"(max-width: 860px) 100vw, 860px\" \/><\/a><figcaption id=\"caption-attachment-39998\" class=\"wp-caption-text\">Git tree viewer<\/figcaption><\/figure><\/p>\n<p>The figure above is actually a <code>Git<\/code> tree viewer.<\/p>\n<p>In addition, you can also find the basic information for your local and remote repository like below:<\/p>\n<p><figure id=\"attachment_39999\" aria-describedby=\"caption-attachment-39999\" style=\"width: 394px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/GitKraken-repository.jpg\"><img decoding=\"async\" class=\"wp-image-39999 size-full\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/GitKraken-repository.jpg\" alt=\"GitKraken repository\" width=\"394\" height=\"696\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/GitKraken-repository.jpg 394w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/GitKraken-repository-170x300.jpg 170w\" sizes=\"(max-width: 394px) 100vw, 394px\" \/><\/a><figcaption id=\"caption-attachment-39999\" class=\"wp-caption-text\">GitKraken repository<\/figcaption><\/figure><\/p>\n<h2>4. Conclusion<\/h2>\n<p>In conclusion, every commit change you made can form a leaf for your <code>Git<\/code> tree. You can check out the tree structure through both the command line and also the GUI software. Both of them can be chosen according to your own preference.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As we know, Git has been popularly used by software developers recently. In comparison with SVN (Apache Subversion) and CVS (Concurrent Version System), Git is more powerful. That lies in its properties of distributed nature, fast operation and branch handling mechanism. In addition, it&#8217;s very convenient for multiple workers to work together with Git. Especially &hellip;<\/p>\n","protected":false},"author":73,"featured_media":27377,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1353],"tags":[1565],"class_list":["post-39942","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-git","tag-git-tree-viewer"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Git Tree Viewer Example - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"As we know, Git has been popularly used by software developers recently. In comparison with SVN (Apache Subversion) and CVS (Concurrent Version System),\" \/>\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-tree-viewer-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Git Tree Viewer Example - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"As we know, Git has been popularly used by software developers recently. In comparison with SVN (Apache Subversion) and CVS (Concurrent Version System),\" \/>\n<meta property=\"og:url\" content=\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-tree-viewer-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-08-08T12:00:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-04-23T11:25:26+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=\"Jun Wu\" \/>\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=\"Jun Wu\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 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-tree-viewer-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-tree-viewer-example\/\"},\"author\":{\"name\":\"Jun Wu\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/6593091dba631ca0f41c4ba4e7c97678\"},\"headline\":\"Git Tree Viewer Example\",\"datePublished\":\"2016-08-08T12:00:31+00:00\",\"dateModified\":\"2019-04-23T11:25:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-tree-viewer-example\/\"},\"wordCount\":1366,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-tree-viewer-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/git-logo.jpg\",\"keywords\":[\"git tree viewer\"],\"articleSection\":[\"Git\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-tree-viewer-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-tree-viewer-example\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-tree-viewer-example\/\",\"name\":\"Git Tree Viewer Example - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-tree-viewer-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-tree-viewer-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/git-logo.jpg\",\"datePublished\":\"2016-08-08T12:00:31+00:00\",\"dateModified\":\"2019-04-23T11:25:26+00:00\",\"description\":\"As we know, Git has been popularly used by software developers recently. In comparison with SVN (Apache Subversion) and CVS (Concurrent Version System),\",\"breadcrumb\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-tree-viewer-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-tree-viewer-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-tree-viewer-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-tree-viewer-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 Tree Viewer 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\/6593091dba631ca0f41c4ba4e7c97678\",\"name\":\"Jun Wu\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/11\/Jun-Wu-96x96.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/11\/Jun-Wu-96x96.jpg\",\"caption\":\"Jun Wu\"},\"description\":\"Jun (Steven) Wu is a current Master student in Computer Science &amp; Engineering department of University of Nebraska Lincoln (Lincoln, NE, USA). His current interests focus on Programming Languages (Java, Python), Relational Database (MySQL), NoSQL Database (Apache Cassandra, MongoDB), and Computer Networks.\",\"sameAs\":[\"https:\/\/wuxiaomin98.wordpress.com\/\"],\"url\":\"https:\/\/examples.javacodegeeks.com\/author\/jun-wu\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Git Tree Viewer Example - Java Code Geeks","description":"As we know, Git has been popularly used by software developers recently. In comparison with SVN (Apache Subversion) and CVS (Concurrent Version System),","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-tree-viewer-example\/","og_locale":"en_US","og_type":"article","og_title":"Git Tree Viewer Example - Java Code Geeks","og_description":"As we know, Git has been popularly used by software developers recently. In comparison with SVN (Apache Subversion) and CVS (Concurrent Version System),","og_url":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-tree-viewer-example\/","og_site_name":"Examples Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2016-08-08T12:00:31+00:00","article_modified_time":"2019-04-23T11:25:26+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":"Jun Wu","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Jun Wu","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-tree-viewer-example\/#article","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-tree-viewer-example\/"},"author":{"name":"Jun Wu","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/6593091dba631ca0f41c4ba4e7c97678"},"headline":"Git Tree Viewer Example","datePublished":"2016-08-08T12:00:31+00:00","dateModified":"2019-04-23T11:25:26+00:00","mainEntityOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-tree-viewer-example\/"},"wordCount":1366,"commentCount":0,"publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-tree-viewer-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/git-logo.jpg","keywords":["git tree viewer"],"articleSection":["Git"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-tree-viewer-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-tree-viewer-example\/","url":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-tree-viewer-example\/","name":"Git Tree Viewer Example - Java Code Geeks","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-tree-viewer-example\/#primaryimage"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-tree-viewer-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/git-logo.jpg","datePublished":"2016-08-08T12:00:31+00:00","dateModified":"2019-04-23T11:25:26+00:00","description":"As we know, Git has been popularly used by software developers recently. In comparison with SVN (Apache Subversion) and CVS (Concurrent Version System),","breadcrumb":{"@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-tree-viewer-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-tree-viewer-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/software-development\/git\/git-tree-viewer-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-tree-viewer-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 Tree Viewer 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\/6593091dba631ca0f41c4ba4e7c97678","name":"Jun Wu","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/11\/Jun-Wu-96x96.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/11\/Jun-Wu-96x96.jpg","caption":"Jun Wu"},"description":"Jun (Steven) Wu is a current Master student in Computer Science &amp; Engineering department of University of Nebraska Lincoln (Lincoln, NE, USA). His current interests focus on Programming Languages (Java, Python), Relational Database (MySQL), NoSQL Database (Apache Cassandra, MongoDB), and Computer Networks.","sameAs":["https:\/\/wuxiaomin98.wordpress.com\/"],"url":"https:\/\/examples.javacodegeeks.com\/author\/jun-wu\/"}]}},"_links":{"self":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/39942","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\/73"}],"replies":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=39942"}],"version-history":[{"count":0,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/39942\/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=39942"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=39942"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=39942"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}