edit this page - needs manual commit from commandline

This commit is contained in:
Expo on server 2020-06-11 13:10:13 +01:00
parent 8c7d14d8a9
commit 7dd554d4e3

View File

@ -7,88 +7,41 @@
</head> </head>
<body> <body>
<h2 id="tophead">CUCC Expedition Handbook - Git Quick</h2> <h2 id="tophead">CUCC Expedition Handbook - Git Quick</h2>
<h1>Quick Reminder - Git</h1> <h1>Quick Reminder - Git</h1>
<h2>Version Control Software Reminders</h2> <h2>Version Control Software Reminders</h2>
<a href="https://merrigrove.blogspot.com/2014/02/why-heck-is-git-so-hard-places-model-ok.html"><img class="onright" src="gitcontentmodel.jpg" alt="git content model" /></a> <p><a href="https://merrigrove.blogspot.com/2014/02/why-heck-is-git-so-hard-places-model-ok.html"><img class="onright" src="gitcontentmodel.jpg" alt="git content model" /></a></p>
<p>This is NOT a tutorial. This is a set of reminders for people who already know all this stuff. <p>This is NOT a tutorial. This is a set of reminders for people who already know all this stuff.</p>
<p>Since 2019 all use of version control software requires that you <p>Since 2019 all use of version control software requires that you have <a href="keyexchange.html">key-pair setup</a> already set up before any of this will work on your own machine.</p>
have <a href="keyexchange.html">key-pair setup</a> already set up before any of this will work on your own machine. <p>- check that you can get ssh working before trying to run git too</p>
<p>If you can get to the <em>expo laptop</em> try these commands on that first as the key exchange has already been done. If the key exchnage has not been done then none of this will work.</p>
<p> <p>You can read or clone these repos without any control, but to write ("push") to them you will need to use <var>ssh://expo@expo.survex.com</var> and set up the <a href="keyexchange.html">key exchange</a>.</p>
- check that you can get ssh working before trying to run git too</font> <p>NOTE: always use user <var>'expo'</var> as the login user (<var>ssh://expo@...</var>) even though within git you will be identified by your own ssh key name.</p>
<p>Open a terminal in a new directory, e.g. /tmp/experiments/ in which you want to create the repo. It will automatically create a folder with the repo name e.g.'troggle' in that directory.</p>
<p>If you can get to the <i>expo laptop</i> try these commands on that first as the key exchange has already been done. If the key exchnage has not been done then none of this will work. <dl><dt>expoweb (The data management system)</dt><dd><tt>git clone ssh://expo@expo.survex.com:expoweb</tt> (read/write)</dd><dt>troggle (The data management system backend)</dt><dd><tt>git clone ssh://expo@expo.survex.com:troggle</tt> (read/write)</dd><dt>loser (The survey data) - this will fail until it is moved from hg to git</dt><dd><tt>git clone ssh://expo@expo.survex.com:loser</tt> (read/write)</dd><dt>drawings</dt><dd><tt>git clone ssh://expo@expo.survex.com:drawings</tt> (read/write)</dd></dl>
<p>You can read or clone these repos without any control, but to write ("push") to them you will need to use <var>ssh://expo@expo.survex.com</var> and set up the <a href="keyexchange.html">key exchange</a>.
<p>NOTE: always use user <var>'expo'</var> as the login user (<var>ssh://expo@...</var>) even though within git you will be identified by your own ssh key name.
<p> Open a terminal in a new directory, e.g. /tmp/experiments/ in which you want to create the repo. It will automatically create a folder with the repo name e.g.'troggle' in that directory.
<dl>
<dt>expoweb (The data management system) </dt>
<dd>
<tt>git clone ssh://expo@expo.survex.com:/home/expo/expoweb</tt> (read/write)<br />
</dd>
<dt>troggle (The data management system backend)</dt>
<dd>
<tt>git clone ssh://expo@expo.survex.com:/home/expo/troggle</tt> (read/write)<br />
</dd>
<dt>loser (The survey data) - this will fail until it is moved from hg to git</dt>
<dd>
<tt>git clone ssh://expo@expo.survex.com:/home/expo/loser</tt> (read/write)<br />
</dd>
<dt>drawings </dt>
<dd>
<tt>git clone ssh://expo@expo.survex.com:/home/expo/drawings</tt> (read/write)<br />
</dd>
</dl>
<h3>Using git</h3> <h3>Using git</h3>
<p> <p><a href="https://stevebennett.me/2012/02/24/10-things-i-hate-about-git/"><img class="onright" src="git-arrows31.png" alt="git bread &amp; butter commands subset" width="250" /></a>You may find these useful:</p>
<ul>
<a href="https://stevebennett.me/2012/02/24/10-things-i-hate-about-git/"><img width="250" <ul>
class="onright" src="git-arrows31.png" alt="git bread & butter commands subset" /></a>You may find these useful: <li><a href="https://ohshitgit.com/">Oh Shit, Git!?!</a></li>
<ul><ul> <li><a href="https://learngitbranching.js.org/">Animated Git training</a></li>
<li><a href="https://ohshitgit.com/">Oh Shit, Git!?!</a> <li><a href="https://merrigrove.blogspot.com/2014/02/why-heck-is-git-so-hard-places-model-ok.html">Why the Heck is Git so Hard?</a></li>
<li><a href="https://learngitbranching.js.org/">Animated Git training</a> <li><a href="https://stevebennett.me/2012/02/24/10-things-i-hate-about-git/">10 things I hate about Git</a></li>
<li><a href="https://merrigrove.blogspot.com/2014/02/why-heck-is-git-so-hard-places-model-ok.html">Why the Heck is Git so Hard?</a> <li><a href="http://www.ndpsoftware.com/git-cheatsheet.html#loc=workspace;">git cheat sheet (clickable)</a></li>
<li><a href="https://stevebennett.me/2012/02/24/10-things-i-hate-about-git/">10 things I hate about Git</a>
<li><a href="http://www.ndpsoftware.com/git-cheatsheet.html#loc=workspace;">git cheat sheet (clickable)</a>
</ul></ul>
<h3><a id="gitwindows">Using git in Windows</a></h3>
<p>Do not use the official "git for Windows" client software as it doesn't understand symlinks in the WSL filesystem (which is what we use on Windows). Use VS Code which understands WSL or a command line git in a WSL terminal window.
<p>"Git is a 4 handle, dual boiler espresso machine when all you need is instant."
<p>Once you've downloaded and installed a git client, the first step is to create what is called a checkout of the data management system. This creates a copy on your machine which you can edit to your heart's content. The command to initially check out ('clone') the entire expo data management system is:</p>
<p><code>git clone ssh://expo@expo.survex.com:/home/expo/expoweb</code></p>
<p>for subsequent updates</p>
<p><code>git update</code></p>
<p>will generally do the trick.</p>
<p>After you've made a change, commit it to you local copy with:</p>
<p><code>git commit</code> (you can specify filenames to be specific)</p>
<h3><a id="pageant">Windows key gotcha</a></h3>
<p>The first time you do this on a Windows machine it will probably not work as it does not recognise the server key exchange.
Fix this by running putty (downloading it from <a href="https://www.chiark.greenend.org.uk/~sgtatham/putty/">https://www.chiark.greenend.org.uk/~sgtatham/putty/</a>), and connecting to the server 'expo@expo.survex.com' (on port 22). Confirm that this is the right server.
If you succeed in getting a shell prompt then ssh connection are working and git should be able to clone the repo, and send changes back.</p>
<img class="onleft" src="pageant-icon.jpg">
<p>For more detailed instructions on making Pageant work see <a href="fzconfig.html">the section in the middle of the Filezilla instructions</a> where it describes how to configure Pageant.
<hr />
</ul> </ul>
</div> </ul>
</body> <h3><a id="gitwindows"></a>Using git in Windows</h3>
<p>Do not use the official "git for Windows" client software as it doesn't understand symlinks in the WSL filesystem (which is what we use on Windows). Use VS Code which understands WSL or a command line git in a WSL terminal window.</p>
<p>"Git is a 4 handle, dual boiler espresso machine &ndash; when all you need is instant."</p>
<p>Once you've downloaded and installed a git client, the first step is to create what is called a checkout of the data management system. This creates a copy on your machine which you can edit to your heart's content. The command to initially check out ('clone') the entire expo data management system is:</p>
<p><code>git clone ssh://expo@expo.survex.com:expoweb</code></p>
<p>for subsequent updates</p>
<p><code>git update</code></p>
<p>will generally do the trick.</p>
<p>After you've made a change, commit it to you local copy with:</p>
<p><code>git commit</code> (you can specify filenames to be specific)</p>
<h3><a id="pageant"></a>Windows key gotcha</h3>
<p>The first time you do this on a Windows machine it will probably not work as it does not recognise the server key exchange. Fix this by running putty (downloading it from <a href="https://www.chiark.greenend.org.uk/~sgtatham/putty/">https://www.chiark.greenend.org.uk/~sgtatham/putty/</a>), and connecting to the server 'expo@expo.survex.com' (on port 22). Confirm that this is the right server. If you succeed in getting a shell prompt then ssh connection are working and git should be able to clone the repo, and send changes back.</p>
<p><img class="onleft" src="pageant-icon.jpg" alt="" /></p>
<p>For more detailed instructions on making Pageant work see <a href="fzconfig.html">the section in the middle of the Filezilla instructions</a> where it describes how to configure Pageant.</p>
<hr /></body>
</html> </html>