using-application-made-for-git.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. <!DOCTYPE html>
  2. <html lang="" xml:lang="">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  6. <title>4 Using application made for git | dealing with gin</title>
  7. <meta name="description" content="4 Using application made for git | dealing with gin" />
  8. <meta name="generator" content="bookdown 0.18.1 and GitBook 2.6.7" />
  9. <meta property="og:title" content="4 Using application made for git | dealing with gin" />
  10. <meta property="og:type" content="book" />
  11. <meta name="twitter:card" content="summary" />
  12. <meta name="twitter:title" content="4 Using application made for git | dealing with gin" />
  13. <meta name="author" content="Julien Colomb and Keisuke Sehara" />
  14. <meta name="viewport" content="width=device-width, initial-scale=1" />
  15. <meta name="apple-mobile-web-app-capable" content="yes" />
  16. <meta name="apple-mobile-web-app-status-bar-style" content="black" />
  17. <link rel="prev" href="web-interface.html"/>
  18. <script src="libs/jquery-2.2.3/jquery.min.js"></script>
  19. <link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
  20. <link href="libs/gitbook-2.6.7/css/plugin-table.css" rel="stylesheet" />
  21. <link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
  22. <link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
  23. <link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
  24. <link href="libs/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
  25. <link href="libs/gitbook-2.6.7/css/plugin-clipboard.css" rel="stylesheet" />
  26. </head>
  27. <body>
  28. <div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">
  29. <div class="book-summary">
  30. <nav role="navigation">
  31. <ul class="summary">
  32. <li class="chapter" data-level="1" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i><b>1</b> Dealing with Gin</a></li>
  33. <li class="chapter" data-level="2" data-path="intro.html"><a href="intro.html"><i class="fa fa-check"></i><b>2</b> Intro</a><ul>
  34. <li class="chapter" data-level="2.1" data-path="intro.html"><a href="intro.html#play-with-sandbox"><i class="fa fa-check"></i><b>2.1</b> Play with Sandbox</a></li>
  35. </ul></li>
  36. <li class="chapter" data-level="3" data-path="web-interface.html"><a href="web-interface.html"><i class="fa fa-check"></i><b>3</b> Web interface</a><ul>
  37. <li class="chapter" data-level="3.1" data-path="web-interface.html"><a href="web-interface.html#cannot-see-a-repository"><i class="fa fa-check"></i><b>3.1</b> Cannot see a repository?</a><ul>
  38. <li class="chapter" data-level="3.1.1" data-path="web-interface.html"><a href="web-interface.html#sign-in-to-gin"><i class="fa fa-check"></i><b>3.1.1</b> Sign in to Gin</a></li>
  39. <li class="chapter" data-level="3.1.2" data-path="web-interface.html"><a href="web-interface.html#check-that-the-repository-exists"><i class="fa fa-check"></i><b>3.1.2</b> Check that the repository exists</a></li>
  40. <li class="chapter" data-level="3.1.3" data-path="web-interface.html"><a href="web-interface.html#make-sure-you-have-access-to-the-repository"><i class="fa fa-check"></i><b>3.1.3</b> Make sure you have access to the repository</a></li>
  41. </ul></li>
  42. <li class="chapter" data-level="3.2" data-path="web-interface.html"><a href="web-interface.html#dashboard-how-to-use"><i class="fa fa-check"></i><b>3.2</b> Dashboard: how to use</a><ul>
  43. <li class="chapter" data-level="3.2.1" data-path="web-interface.html"><a href="web-interface.html#activity"><i class="fa fa-check"></i><b>3.2.1</b> Activity</a></li>
  44. <li class="chapter" data-level="3.2.2" data-path="web-interface.html"><a href="web-interface.html#collaborative-repositories"><i class="fa fa-check"></i><b>3.2.2</b> Collaborative repositories</a></li>
  45. <li class="chapter" data-level="3.2.3" data-path="web-interface.html"><a href="web-interface.html#private-repositories"><i class="fa fa-check"></i><b>3.2.3</b> Private repositories</a></li>
  46. </ul></li>
  47. <li class="chapter" data-level="3.3" data-path="web-interface.html"><a href="web-interface.html#browsing-a-repository"><i class="fa fa-check"></i><b>3.3</b> Browsing a repository</a><ul>
  48. <li class="chapter" data-level="3.3.1" data-path="web-interface.html"><a href="web-interface.html#overview-of-the-repository"><i class="fa fa-check"></i><b>3.3.1</b> Overview of the repository</a></li>
  49. <li class="chapter" data-level="3.3.2" data-path="web-interface.html"><a href="web-interface.html#browsing-files"><i class="fa fa-check"></i><b>3.3.2</b> Browsing files</a></li>
  50. </ul></li>
  51. <li class="chapter" data-level="3.4" data-path="web-interface.html"><a href="web-interface.html#downloading-files"><i class="fa fa-check"></i><b>3.4</b> Downloading files</a><ul>
  52. <li class="chapter" data-level="3.4.1" data-path="web-interface.html"><a href="web-interface.html#download-button"><i class="fa fa-check"></i><b>3.4.1</b> Download button</a></li>
  53. </ul></li>
  54. <li class="chapter" data-level="3.5" data-path="web-interface.html"><a href="web-interface.html#uploading-and-editing-files"><i class="fa fa-check"></i><b>3.5</b> Uploading and editing files</a><ul>
  55. <li class="chapter" data-level="3.5.1" data-path="web-interface.html"><a href="web-interface.html#overview"><i class="fa fa-check"></i><b>3.5.1</b> Overview</a></li>
  56. <li class="chapter" data-level="3.5.2" data-path="web-interface.html"><a href="web-interface.html#create-a-new-text-based-file"><i class="fa fa-check"></i><b>3.5.2</b> Create a new text-based file</a></li>
  57. <li class="chapter" data-level="3.5.3" data-path="web-interface.html"><a href="web-interface.html#edit-a-text-based-file"><i class="fa fa-check"></i><b>3.5.3</b> Edit a text-based file</a></li>
  58. <li class="chapter" data-level="3.5.4" data-path="web-interface.html"><a href="web-interface.html#uploading-a-set-of-files"><i class="fa fa-check"></i><b>3.5.4</b> Uploading a set of files</a></li>
  59. <li class="chapter" data-level="3.5.5" data-path="web-interface.html"><a href="web-interface.html#location-of-buttons-for-uploading"><i class="fa fa-check"></i><b>3.5.5</b> Location of buttons for uploading</a></li>
  60. <li class="chapter" data-level="3.5.6" data-path="web-interface.html"><a href="web-interface.html#specifying-the-directory-to-be-uploaded"><i class="fa fa-check"></i><b>3.5.6</b> Specifying the directory to be uploaded</a></li>
  61. <li class="chapter" data-level="3.5.7" data-path="web-interface.html"><a href="web-interface.html#committing-new-files"><i class="fa fa-check"></i><b>3.5.7</b> Committing new files</a></li>
  62. </ul></li>
  63. </ul></li>
  64. <li class="chapter" data-level="4" data-path="using-application-made-for-git.html"><a href="using-application-made-for-git.html"><i class="fa fa-check"></i><b>4</b> Using application made for git</a><ul>
  65. <li class="chapter" data-level="4.1" data-path="using-application-made-for-git.html"><a href="using-application-made-for-git.html#generalities"><i class="fa fa-check"></i><b>4.1</b> generalities</a></li>
  66. <li class="chapter" data-level="4.2" data-path="using-application-made-for-git.html"><a href="using-application-made-for-git.html#git-gui"><i class="fa fa-check"></i><b>4.2</b> Git GUI</a></li>
  67. <li class="chapter" data-level="4.3" data-path="using-application-made-for-git.html"><a href="using-application-made-for-git.html#using-rstudio-with-gin"><i class="fa fa-check"></i><b>4.3</b> Using Rstudio with GIN</a></li>
  68. </ul></li>
  69. </ul>
  70. </nav>
  71. </div>
  72. <div class="book-body">
  73. <div class="body-inner">
  74. <div class="book-header" role="navigation">
  75. <h1>
  76. <i class="fa fa-circle-o-notch fa-spin"></i><a href="./">dealing with gin</a>
  77. </h1>
  78. </div>
  79. <div class="page-wrapper" tabindex="-1" role="main">
  80. <div class="page-inner">
  81. <section class="normal" id="section-">
  82. <div id="using-application-made-for-git" class="section level1">
  83. <h1><span class="header-section-number">4</span> Using application made for git</h1>
  84. <div id="generalities" class="section level2">
  85. <h2><span class="header-section-number">4.1</span> generalities</h2>
  86. <p>Several application are meant to deal with git commands without having to use the terminal. They usually do not deal with git annex commands, so only small files (&lt; 50MB) can be pushed via their interface. If most of your files are below that limit, one can use these application for routine work, and use either the command line (with <code>gin update .</code>) or the browser interface from time to time to upload big files.</p>
  87. <p>Most of them have a way to push to external servers like GitHub, gitlab, or bitbucket. They are usually to ways to make this connection: via https or via ssh. The ssh version is more secure, but you need to set up keys for each computer you are using, and add these keys to the server. Gin can be used as a git server and usual git commands will work normally, but GIN has no https connection: one needs to use ssh. One finds easily walkthrough to set up ssh connections for different application. Some examples will be given in the next chapters.</p>
  88. <p>In addition, you need to set some configuration for git to push to a git server. This is often best done via the command lines:</p>
  89. <pre><code>git config --global user.name &quot;FIRST_NAME LAST_NAME&quot;
  90. git config --global user.email &quot;MY_NAME@example.com&quot;</code></pre>
  91. </div>
  92. <div id="git-gui" class="section level2">
  93. <h2><span class="header-section-number">4.2</span> Git GUI</h2>
  94. <p>The <code>git gui</code> command comes with the normal Git bundle. Git GUI can be used to visualize:</p>
  95. <ul>
  96. <li>modifications in the repository</li>
  97. <li>files in the staging area</li>
  98. <li>the commit message</li>
  99. </ul>
  100. </div>
  101. <div id="using-rstudio-with-gin" class="section level2">
  102. <h2><span class="header-section-number">4.3</span> Using Rstudio with GIN</h2>
  103. <p>Rstudio is a very nice application that was created to write and run R code. It now also has the possibilities to run python code and create reproducible reports in Rmarkdown (there are also specific tools to deal with citations in these reports). It also has git functionalities, allowing to <code>commit</code> (save a new version of your repository locally), <code>pull</code>(download changes existant on the server but absent of your local folder) and <code>push</code> (save all new versions present locally to the server version).</p>
  104. <p>You need first to make sure git is installed and found by Rstudio: go the menu <code>tools &gt; global options &gt; git</code> browse to the git.exe if Rstudio did not find it automatically (a git.exe is installed together with the gin-cli, but you can also install another via <a href="https://git-scm.com/downloads" class="uri">https://git-scm.com/downloads</a>. Find a walkthrough on how to set up ssh here: <a href="https://happygitwithr.com/ssh-keys.html" class="uri">https://happygitwithr.com/ssh-keys.html</a>. What you are asked to do on github will be done on GIN (<a href="https://gin.g-node.org/user/settings/ssh" class="uri">https://gin.g-node.org/user/settings/ssh</a>).</p>
  105. <p>You can now download new repositories using <code>file &gt; new project... &gt;&gt;version control &gt;&gt; git</code> insert the ssh link you get on the gin repository page (for this repo <code>git@gin.g-node.org:/larkumlab/Dealing_with_Gin.git</code>) and decide the folder name and where to save it on your machine. I put all my repositories in a special <code>gin</code> folder in my document folder, but this is up to you to organise your files.</p>
  106. <p>You can then make changes, on the right part of the Rstudio window, you can access a <code>git</code> tab, where changed files are listed. You can then use the buttons of the tab to commit changes, pull, or push commits to GIN. Git advices:</p>
  107. <ul>
  108. <li>make small commits</li>
  109. <li>give commits a meaningfull comment which will allow you to spot changes easily in the history tab</li>
  110. <li>if you are working on different machines, do not forget to pull changes when you start working, and push before you go.</li>
  111. </ul>
  112. </div>
  113. </div>
  114. </section>
  115. </div>
  116. </div>
  117. </div>
  118. <a href="web-interface.html" class="navigation navigation-prev navigation-unique" aria-label="Previous page"><i class="fa fa-angle-left"></i></a>
  119. </div>
  120. </div>
  121. <script src="libs/gitbook-2.6.7/js/app.min.js"></script>
  122. <script src="libs/gitbook-2.6.7/js/lunr.js"></script>
  123. <script src="libs/gitbook-2.6.7/js/clipboard.min.js"></script>
  124. <script src="libs/gitbook-2.6.7/js/plugin-search.js"></script>
  125. <script src="libs/gitbook-2.6.7/js/plugin-sharing.js"></script>
  126. <script src="libs/gitbook-2.6.7/js/plugin-fontsettings.js"></script>
  127. <script src="libs/gitbook-2.6.7/js/plugin-bookdown.js"></script>
  128. <script src="libs/gitbook-2.6.7/js/jquery.highlight.js"></script>
  129. <script src="libs/gitbook-2.6.7/js/plugin-clipboard.js"></script>
  130. <script>
  131. gitbook.require(["gitbook"], function(gitbook) {
  132. gitbook.start({
  133. "sharing": {
  134. "github": false,
  135. "facebook": true,
  136. "twitter": true,
  137. "linkedin": false,
  138. "weibo": false,
  139. "instapaper": false,
  140. "vk": false,
  141. "all": ["facebook", "twitter", "linkedin", "weibo", "instapaper"]
  142. },
  143. "fontsettings": {
  144. "theme": "white",
  145. "family": "sans",
  146. "size": 2
  147. },
  148. "edit": {
  149. "link": "https://gin.g-node.org/larkumlab/Dealing_with_Gin/_edit/master/git-applications/README.md",
  150. "text": "Edit"
  151. },
  152. "history": {
  153. "link": null,
  154. "text": null
  155. },
  156. "view": {
  157. "link": null,
  158. "text": null
  159. },
  160. "download": null,
  161. "toc": {
  162. "collapse": "subsection"
  163. }
  164. });
  165. });
  166. </script>
  167. </body>
  168. </html>