diff --git a/Git Tutorial.lnk b/Git Tutorial.lnk new file mode 100644 index 0000000000000000000000000000000000000000..f8ea0d985e6f6508bc9cd75c3f39b0d1f71c0bb1 Binary files /dev/null and b/Git Tutorial.lnk differ diff --git a/www-site/Git Tutorial.html b/www-site/Git Tutorial.html index 75d960948c7856d4f4201fd7b41fd6c31e429ff4..2f8969ea20b4fb49e89e29a07176bdcd13c6ffdc 100644 --- a/www-site/Git Tutorial.html +++ b/www-site/Git Tutorial.html @@ -9,9 +9,7 @@ <link href="css/zjwgi/GUI.css" rel="stylesheet" type="text/css"> <link href="css/zjwgi/generic_instructions.css" rel="stylesheet" type="text/css"> <link href="css/zjwgi/ClassAssignmentWartell.css" rel="stylesheet" type="text/css"> - <link media="print" href="css/zjwgi/generic_instructions-print.css" rel="stylesheet" - - type="text/css"> + <link media="print" href="css/zjwgi/generic_instructions-print.css" rel="stylesheet" type="text/css"> <script src="scripts/zjwgi/generic_instructions.js"></script> <script type="module" lang="javascript"> import * as Rubric from "./scripts/zjwgi/Rubric.js"; @@ -66,6 +64,14 @@ } } </script> + <!-- + <script type="application/json" class="js-hypothesis-config"> + { + "openSidebar": true + } + </script> + <script async src="https://hypothes.is/embed.js"></script> + --> </head> <body onload="onload_Body();"> <div class="window-container"> </div> @@ -77,35 +83,25 @@ </div> <div class="main-content" id="Content"> <div class="toolbar" id="Toolbar"> - <div class="Menu"> <button id="help" class="DocButton" onclick='window.open("html/zjwgi/Help.html");'> - Help </button> <b>|</b> - <div class="DocButton"> <input name="Beta_Mode" id="Beta_Mode" type="checkbox"> - <label for="Beta_Mode">Beta Mode</label> </div> + <div class="Menu"> <button id="help" class="DocButton" onclick='window.open("html/zjwgi/Help.html");'> Help </button> <b>|</b> + <div class="DocButton"> <input name="Beta_Mode" id="Beta_Mode" type="checkbox"> <label for="Beta_Mode">Beta Mode</label> </div> <div id="BetaModeGUI" style="display:inherit;"> - <div class="DocButton"> <button id="Question" class="DocButton" disabled="true">Q&A</button> - <span>Post question on <br> - selected text <a target="_blank" href="html/zjwgi/Help.html#DocButton_Question">(more)</a> - </span> </div> + <div class="DocButton"> <button id="Question" class="DocButton" disabled="true">Q&A</button> <span>Post question on <br> + selected text <a target="_blank" href="html/zjwgi/Help.html#DocButton_Question">(more)</a> </span> </div> <b>|</b> - <div class="DocButton"> <button id="GoogleGroupButton" class="DocButton" - - disabled="true" onclick="window.open('https://groups.google.com/a/uncc.edu/g/computer-graphics-wartell-group','_blank')">Google + <div class="DocButton"> <button id="GoogleGroupButton" class="DocButton" disabled="true" onclick="window.open('https://groups.google.com/a/uncc.edu/g/computer-graphics-wartell-group','_blank')">Google Group</button> <span>Open tab with class Google Group <br> - <!-- <a target="_blank" href="html/zjwgi/help.html#DocButton_Question">(more)</a> --> - </span> </div> + <!-- <a target="_blank" href="html/zjwgi/help.html#DocButton_Question">(more)</a> --> </span> </div> <!-- <b>||</b> <div class="DocButton"> <button id="back" class="DocButton" disabled="true">🡰</button> <span>Navigate Back <a href="html/zjwgi/help.html#DocButton_back"></a> </span> </div> <div class="DocButton"> <button id="forward" class="DocButton" disabled="true">🡲</button> <span>Navigate Forward <a href="html/zjwgi/help.html#DocButton_forward"></a> </span> </div> --> <b>||</b> - <div> <input name="Instructor_Mode" id="Instructor_Mode" disabled="true" - - type="checkbox"> <label for="Instructor_Mode">TA Mode</label> - <b>|</b> | + <div> <input name="Instructor_Mode" id="Instructor_Mode" disabled="true" type="checkbox"> <label for="Instructor_Mode">TA Mode</label> <b>|</b> + | <!-- <a href="mailto:computer-graphics-wartell-group@uncc.edu">mail test</a> <a id="SendComment" target="_blank" href="">Send Comment</a> <a target="_blank" href="https://mail.google.com/mail/u/0/#inbox?compose=new">mail test #2 </a> --> <button id="fileMenu" disabled="disabled" onclick="document.getElementById('fileSubMenu').hidden=false;">Rubric</button> <ul id="fileSubMenu" class="SubMenu" hidden=""> - <li> <input id="loadFile" name="loadFile" accept="/html" type="file"> - </li> + <li> <input id="loadFile" name="loadFile" accept="/html" type="file"> </li> <li><button id="Export">Export</button></li> <li><button id="exportAll">Download</button></li> </ul> @@ -115,55 +111,41 @@ </div> <article> <div> - <h2 class="nocount Title">ITCS <span data-course-number=""></span> - : Git Tutorial and "Coding" Standards </h2> + <h2 class="nocount Title">ITCS <span data-course-number=""></span> : Git Tutorial and "Coding" Standards </h2> <h2 class="nocount Title">Spring 2025</h2> <h3 class="nocount Title">Professor: Zachary Wartell</h3> <div style="display : block; text-align: center;"> - <div>Revision: <span class="Revision">Tue Aug 20 13:46:22 2024 - -0400</span> <sup> (<a href="https://zwartell@gitlab.com/zwartell/Git_Tutorial_and_Coding_Standards/-/commits/master" + <div>Revision: <span class="Revision">Tue Feb 4 09:57:11 2025 -0500</span> <sup> (<a href="https://zwartell@gitlab.com/zwartell/Git_Tutorial_and_Coding_Standards/-/commits/master" target="_blank">git logs</a>) </sup><br> <br> </div> - <div> <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"> - <img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png"></a><br> + <div> <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"> <img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png"></a><br> </div> - <div> This <span>ITCS <span data-course-number=""></span> - assignment </span> by <a href="https://webpages.uncc.edu/zwartell/" + <div> This <span>ITCS <span data-course-number=""></span> assignment </span> by <a href="https://webpages.uncc.edu/zwartell/" rel="cc:attributionURL" - rel="cc:attributionURL" target="_blank" title="https://webpages.uncc.edu/zwartell/">Zachary - Justin Wartell</a> is licensed under a <a rel="license" href="http://creativecommons.org/lice%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20nses/by-nc-sa/4.0/">Creative - Commons Attribution-NonCommercial-ShareAlike 4.0 International - License</a>. This html code leverages various open source - modules (see <a href="#Open_Source_Modules">Open Source Modules</a>). - </div> </div> + target="_blank" title="https://webpages.uncc.edu/zwartell/">Zachary Justin Wartell</a> is licensed under a <a rel="license" href="http://creativecommons.org/lice%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20nses/by-nc-sa/4.0/">Creative + Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>. This html code leverages various open source modules (see <a href="#Open_Source_Modules">Open + Source Modules</a>). </div> + </div> <hr> </div> <section> <p style="text-align: left;" class="Title">Purpose</p> - <p> This is a gradable tutorial built around the excellent book, Pro - Git by Scott Chacon (<a target="_blank" href="http://git-scm.com/book">http://git-scm.com/book</a>). - The tutorial is customized for the computing environment in CCI at - UNC Charlotte and targets courses taught by the author, Prof. - Zachary Wartell. </p> + <p> This is a gradable tutorial built around the excellent book, Pro Git by Scott Chacon (<a target="_blank" href="http://git-scm.com/book">http://git-scm.com/book</a>). + The tutorial is customized for the computing environment in CCI at UNC Charlotte and targets courses taught by the author, Prof. Zachary Wartell. + </p> </section> <section><a name="Document-Configuration" id="Document-Configuration"></a> - <h1 id="Document_Configuration" class="nocount">Document - Configuration</h1> + <h1 id="Document_Configuration" class="nocount">Document Configuration</h1> <!-- <button class="Text_Button" onclick="Div_Toggle('Server_Supports_SSH');"> SSH </button> --> - <p> Parts of this document are specific to particular operating - systems, and particular Git servers. In general, your - instructor will tell you what git server to use for your class and - will tell you what operating systems are allowable in your class. - </p> + <p> Parts of this document are specific to particular operating systems, and particular Git servers. In general, your instructor will + tell you what git server to use for your class and will tell you what operating systems are allowable in your class. </p> <p> Information for some specific courses is also given below: </p> <ul> <!-- <li> [<i>Course</i>=ITCS 5122/4122- Fall 2023] In this course all student submissions are to <span class="File_Name">cci-git.charlotte.edu</span>. Regarding operating systems, any OS is acceptable as long as it supports command-line git and the Chrome browser. </li> --> - <li> [<i>Course</i>=ITCS 3120] In this course all student - submissions are to <span class="File_Name">cci-git.charlotte.edu</span>. - Regarding operating systems, any OS is acceptable as long as it - supports command-line git and the Chrome browser. </li> + <li> [<i>Course</i>=ITCS 3120] In this course all student submissions are to <span class="File_Name">cci-git.charlotte.edu</span>. Regarding + operating systems, any OS is acceptable as long as it supports command-line git and the Chrome browser. </li> </ul> <p></p> <!-- disabling this feature for now @@ -171,18 +153,13 @@ <!-- <button class="Text_Button" onclick="Div_Toggle('Server_Git_Viscenter');Div_Toggle('Server_Supports_SSH');"> git-viscenter </button> <button class="Text_Button" onclick="Div_Toggle('Server_Bitbucket');Div_Toggle('Server_Supports_SSH');"> Bitbucket </button> <button class="Text_Button" onclick="Div_Toggle('Server_Cci_Git');"> cci-git </button> --> <!-- disabling this feature for now - <form name="System_Configuration"> <fieldset> <legend>Display Instructions For: </legend> < !-- <p><label>Git Server: </label> <input name="Git_Server" id="cci_git" value="cci_git" checked="checked" onchange="onchange_Git_Server()" type="radio"> <label for="cci_git">cci-git</label> <input name="Git_Server" id="bitbucket" value="bitbucket" onchange="onchange_Git_Server()" disabled="disabled" type="radio"> <label for="bitbucket">Bitbucket</label> </p> -- > <p><label>Operating System: </label> <input name="Operating_System" id="Windows" value="Windows" checked="checked" onchange="Div_Toggle('OS_Windows');" type="checkbox"> <label for="Windows">Windows</label> <input name="Operating_System" id="Unix" value="Unix" checked="checked" onchange="Div_Toggle('OS_Unix');" type="checkbox"> <label for="Unix">Unix</label> <input name="Operating_System" id="Mac" value="Mac" checked="checked" onchange="Div_Toggle('OS_Mac');" - type="checkbox"> <label for="Mac">Mac</label></p> </fieldset> </form> --> + <form name="System_Configuration"> <fieldset> <legend>Display Instructions For: </legend> < !-- <p><label>Git Server: </label> <input name="Git_Server" id="cci_git" value="cci_git" checked="checked" onchange="onchange_Git_Server()" type="radio"> <label for="cci_git">cci-git</label> <input name="Git_Server" id="bitbucket" value="bitbucket" onchange="onchange_Git_Server()" disabled="disabled" type="radio"> <label for="bitbucket">Bitbucket</label> </p> -- > <p><label>Operating System: </label> <input name="Operating_System" id="Windows" value="Windows" checked="checked" onchange="Div_Toggle('OS_Windows');" type="checkbox"> <label for="Windows">Windows</label> <input name="Operating_System" id="Unix" value="Unix" checked="checked" onchange="Div_Toggle('OS_Unix');" type="checkbox"> <label for="Unix">Unix</label> <input name="Operating_System" id="Mac" value="Mac" checked="checked" onchange="Div_Toggle('OS_Mac');" type="checkbox"> <label for="Mac">Mac</label></p> </fieldset> </form> --> <hr> </section> <section> <h1 class="Section" id="Prerequisites">Prerequisites</h1> - <p> This assignment assumes the reader has prerequisite knowledge of - several topics. Elaboration on these topics and additional - resource materials are placed in sub-sections of this assignment - at the points when the knowledge is first needed. Such - sub-sections have headings that are prefixed with the phrase - "[Pre-Req,]". For convenience, the complete list of - prerequisite topics are also listed below. </p> + <p> This assignment assumes the reader has prerequisite knowledge of several topics. Elaboration on these topics and additional resource + materials are placed in sub-sections of this assignment at the points when the knowledge is first needed. Such sub-sections have headings + that are prefixed with the phrase "[Pre-Req,]". For convenience, the complete list of prerequisite topics are also listed below. </p> <ol class="Instruction_NonRubric"> <li><em>Bash Command-Line Shell </em><strong></strong><em><br> </em></li> @@ -195,18 +172,11 @@ </ol> </section> <section> - <h1 class="Section" id="Guide_to_Reading_these_Instructions"> Guide - to Reading these Instructions </h1> - <object type="text/html" data="html/zjwgi/Typographic_Conventions.html" - - height="1350px" width="100%"></object> </section> - <section class="Instruction_Section" data-optionset="{"name":"Part 1"}" - - data-point-fraction="10"> - <h1 class="Section" id="Installing_Git">Part 1: Installing Git - Client </h1> - <p> Git is a command-line client program that runs on your computer - and communicates to the Git server. + <h1 class="Section" id="Guide_to_Reading_these_Instructions"> Guide to Reading these Instructions </h1> + <object type="text/html" data="html/zjwgi/Typographic_Conventions.html" height="1350px" width="100%"></object> </section> + <section class="Instruction_Section" data-optionset="{"name":"Part 1"}" data-point-fraction="10"> + <h1 class="Section" id="Installing_Git">Part 1: Installing Git Client </h1> + <p> Git is a command-line client program that runs on your computer and communicates to the Git server. <!-- Git servers uses various access protocols for security and authorization. Depending what access protocol your designated Git server uses you may need to have or install additional software beyond command-line Git. --> <!-- @@ -217,128 +187,76 @@ <!-- <p><u><i>Personal Computer</i></u>: If you are working on a personal computer, you need to install the Git client tools. Installation are below. <!- in <a href="#Installation_and_Setup_of_Command-Line">Installation_and_Setup_of_Command-Line</a> and <a href="#Installation_and_Setup_of_Git_GUIs">Installation_and_Setup_of_Git_GUIs</a>. -> <!- After performing these installations, if your designated Git server is <span class="Server_Name"> cci-git </span>you can proceed to <a href="file:///D:/Users/Zachary/Dropbox%20%28UNC%20Charlotte%29/classes/Repository_Usage/new/new/Git%20Tutorial.html#Full_Git_Tutorial">Full_Git_Tutorial</a>. If your server is either <span class="File_Name">Bitbucket</span><span class="File_Name"></span>, you also need to also perform <a href="#Installation_and_Setup_of_OpenSSH">Installation_and_Setup_of_OpenSSH</a> and then proceed to <a href="file:///D:/Users/Zachary/Dropbox%20%28UNC%20Charlotte%29/classes/Repository_Usage/new/new/Git%20Tutorial.html#Full_Git_Tutorial">Full_Git_Tutorial</a>. -> </p> --> <section class="Instruction_Section" data-point-fraction="100"> - <h2 class="Section" id="Installation_and_Setup_of_Command-Line_Git"><a - - name="Installation_and_Setup_of_Command-Line"></a>Installation - of Command-Line Git </h2> - <p>This section walks you through installing Git client tools on - your computer.</p> + <h2 class="Section" id="Installation_and_Setup_of_Command-Line_Git"><a name="Installation_and_Setup_of_Command-Line"></a>Installation of + Command-Line Git </h2> + <p>This section walks you through installing Git client tools on your computer.</p> <ol class="Instruction"> - <li class="Instruction_Option_Set"> <em>Instructions below vary - with your operating system.</em> + <li class="Instruction_Option_Set"> <em>Instructions below vary with your operating system.</em> <ol> <li> [<em>YourOS</em>=<strong>Windows</strong>] <div class="OS_Windows"> <ol> - <li> Download and Install Git for Windows, <a href="https://git-scm.com/downloads" - - target="_blank">https://git-scm.com/downloads</a>. + <li> Download and Install Git for Windows, <a href="https://git-scm.com/downloads" target="_blank">https://git-scm.com/downloads</a>. <br> <br> - This installs a minimal Unix style shell (called - ‘git-bash’), the basic OpenSSH tools and git. - During install select the options indicated in the - sequence below:<br> - <iframe allowfullscreen="true" allow="autoplay *" title="Install Git for Windows" - - src="https://uncc.instructuremedia.com/embed/29fbb42f-1284-4c4e-b3ad-dc0fefccd13b" - - height="320px" frameborder="0" width="560px"></iframe> - </li> - <li> Note, git-bash does not install the full Unix - help documentation ( .e.g. the 'man' command). - However, you can get some basic information for any - command by typing a command name with just the - parameter <em>--help</em>. To - find the complete man pages for a given Unix - command, we suggest using <a class="WindowOpenLeft" - - onclick="windowOpenLeft('https://www.gnu.org/manual/manual.en.html','GNU');">https://www.gnu.org/manual/manual.en.html</a>. - (There are ways to install the Unix man command and - man pages into git-bash, but it is generally <u>not</u> - worth the effort). <br> + This installs a minimal Unix style shell (called ‘git-bash’), the basic OpenSSH tools and git. During install select the + options indicated in the sequence below:<br> + <iframe allowfullscreen="true" allow="autoplay *" title="Install Git for Windows" src="https://uncc.instructuremedia.com/embed/29fbb42f-1284-4c4e-b3ad-dc0fefccd13b" + + height="320px" frameborder="0" width="560px"></iframe> </li> + <li> Note, git-bash does not install the full Unix help documentation ( .e.g. the 'man' command). However, you can get some basic + information for any command by typing a command name with just the parameter <em>--help</em>. To find the + complete man pages for a given Unix command, we suggest using <a class="WindowOpenLeft" onclick="windowOpenLeft('https://www.gnu.org/manual/manual.en.html','GNU');">https://www.gnu.org/manual/manual.en.html</a>. + (There are ways to install the Unix man command and man pages into git-bash, but it is generally <u>not</u> worth the effort). <br> <br> - Students who are advanced Windows users can - alternatively install the much more complex "Unix - emulators" <a href="https://www.cygwin.com/" target="_blank"> - https://www.cygwin.com<span style="color: black;"></span> - </a> or the comprehensive <a href="https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux" + Students who are advanced Windows users can alternatively install the much more complex "Unix emulators" <a href="https://www.cygwin.com/" - target="_blank">https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux</a>. - However, the TA and professor cannot provide support - for these other options, but if you have <u>already</u> - installed them and are <u>already</u> familiar with - them, you can these system's version of git instead - of git-bash. </li> + target="_blank"> https://www.cygwin.com<span style="color: black;"></span> </a> or the comprehensive <a href="https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux" + + target="_blank">https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux</a>. However, the TA and professor cannot + provide support for these other options, but if you have <u>already</u> installed them and are <u>already</u> familiar with them, + you can these system's version of git instead of git-bash. </li> <br> </ol> </div> </li> - <li> [<em>YourOS</em>=<strong>Linux</strong>] Typically, - default Linux/Unix installations include Git. If Git - is not installed, then download and install Git from <a target="_blank" - - href="http://git-scm.com">http://git-scm.com/</a>. </li> - <li> [<em>YourOS</em>=<strong>Mac</strong>] - Download and install Git from <a href="http://git-scm.com" - - target="_blank">http://git-scm.com/</a>. </li> + <li> [<em>YourOS</em>=<strong>Linux</strong>] Typically, default Linux/Unix installations include Git. If Git is not installed, then + download and install Git from <a target="_blank" href="http://git-scm.com">http://git-scm.com/</a>. </li> + <li> [<em>YourOS</em>=<strong>Mac</strong>] Download and install Git from <a href="http://git-scm.com" target="_blank">http://git-scm.com/</a>. + </li> </ol> </li> </ol> <u><i id="Default_Refspec">Default "refspec": main vs master</i></u> - <p> When you create a git repository, it is given a default name, - technically called a "refspec". A refspec is a string that names - or identifies the version of the repo with which you are - currently working. (In 'real-world' git managed projects, - it is common to have multiple named versions called "branches"). - </p> - <p> The original convention was that a repo was initialized to - default name "master" (as in a <a href="https://en.wikipedia.org/wiki/Mastering_%28audio%29" - - target="_blank">master recording</a> or a <a href="https://www.etymonline.com/word/master" - - target="_blank">master key</a>). Circa the 2020's, it is more - common to instead use the default name "main". - Different documentation on git use one convention or the - other. WWW git servers typically allow you to set the - default to whatever you choose. </p> - <p> UNCC CCI's GitLab server, to which you will be submitting your - course work, defaults all newly created repo's to use tag - 'main'. Therefore, you should make sure that your git client is - also set to use 'main' as the default. The git client can be - configured as described below: </p> + <p> When you create a git repository, it is given a default name, technically called a "refspec". A refspec is a string that names or identifies + the version of the repo with which you are currently working. (In 'real-world' git managed projects, it is common to have multiple named + versions called "branches"). </p> + <p> The original convention was that a repo was initialized to default name "master" (as in a <a href="https://en.wikipedia.org/wiki/Mastering_%28audio%29" + + target="_blank">master recording</a> or a <a href="https://www.etymonline.com/word/master" target="_blank">master key</a>). Circa the 2020's, + it is more common to instead use the default name "main". Different documentation on git use one convention or the other. WWW + git servers typically allow you to set the default to whatever you choose. </p> + <p> UNCC CCI's GitLab server, to which you will be submitting your course work, defaults all newly created repo's to use tag 'main'. Therefore, + you should make sure that your git client is also set to use 'main' as the default. The git client can be configured as described below: </p> <ol> <li> <table class="Code_Example"> <tbody> <tr> - <td> <button onclick="Code_Example_Toggle('Code_Example_0_3ai');">▽</button> - </td> + <td> <button onclick="Code_Example_Toggle('Code_Example_0_3ai');">▽</button> </td> <td> <div> - <div class="Shell_Code_Comment">Below is a guide to - make sure the default setting is main.</div> - <code class="Shell_Code_Prompt-v2">ada@turing42~/</code> - <code class="Shell_Code_Input-v2">git config - --system --get init.defaultbranch</code> <code class="Shell_Code_Output">main</code><br> - <div class="Shell_Code_Comment">If you see the - above, stop. You are done with Section 3.1.</div> - <div class="Shell_Code_Comment">Otherwise, try the - following:</div> - <code class="Shell_Code_Input-v2">git config - --global --get init.defaultbranch</code> <code class="Shell_Code_Output">main</code><br> - <div class="Shell_Code_Comment">If you see the - above, stop. You are done with Section 3.1.</div> - <div class="Shell_Code_Comment">Otherwise, if - init.defaultbranch is 'master' then do the - following:</div> - <code class="Shell_Code_Input-v2">git config - --global --replace-all init.defaultbranch main</code> - <div class="Shell_Code_Comment">Otherwise, if - init.defaultbranch is blank then do the following:</div> - <code class="Shell_Code_Input-v2">git config - --global --add init.defaultbranch main</code> </div> + <div class="Shell_Code_Comment">Below is a guide to make sure the default setting is main.</div> + <code class="Shell_Code_Prompt-v2">ada@turing42~/</code> <code class="Shell_Code_Input-v2">git config --system --get + init.defaultbranch</code> <code class="Shell_Code_Output">main</code><br> + <div class="Shell_Code_Comment">If you see the above, stop. You are done with Section 3.1.</div> + <div class="Shell_Code_Comment">Otherwise, try the following:</div> + <code class="Shell_Code_Input-v2">git config --global --get init.defaultbranch</code> <code class="Shell_Code_Output">main</code><br> + <div class="Shell_Code_Comment">If you see the above, stop. You are done with Section 3.1.</div> + <div class="Shell_Code_Comment">Otherwise, if init.defaultbranch is 'master' then do the following:</div> + <code class="Shell_Code_Input-v2">git config --global --replace-all init.defaultbranch main</code> + <div class="Shell_Code_Comment">Otherwise, if init.defaultbranch is blank then do the following:</div> + <code class="Shell_Code_Input-v2">git config --global --add init.defaultbranch main</code> </div> </td> </tr> </tbody> @@ -348,143 +266,123 @@ </section> <section> <h2 class="Section">[Pre-Req.] Command-Line Interface Shell</h2> - <p>The remainder of this assignment assumes you have knowledge of - the material listed below. Each listed topic contains - recommended reading if you do not already know the topic. </p> + <p>The remainder of this assignment assumes you have knowledge of the material listed below. Each listed topic contains recommended reading + if you do not already know the topic. </p> <ol> - <li><em><u>Bash Command-Line Shell</u></em>: The git - instructions in this assignment and in the <em>Pro Git</em> - book use Bash, a particular command-line shell <a href="#WP2023">[WP2023]</a>. - You need to have a basic understanding of the Bash - shell. If you are <u>not</u> already familiar with - Bash, read the short introduction at <a class="Citation" href="#WART2021">[WART2021]</a>. - </li> - <li><em><u>Environment Variables</u></em>: Regarding - environment variables, you should know what they are and how - to modify them. In particular knowledge of the PATH - environment variable is required. A general - discussion is found at <a class="Citation" href="#WP2016a">[WP2016a]</a> - and with specifics on PATH at <a class="Citation" href="#WP2016b">[WP2016b]</a>. - The method to modify environment variables differs across - operating system. See <a class="Citation" href="#Microsoft2016">[Microsoft2016]</a> - for Windows or <a class="Citation" href="#Apple2016">[Apple2016]</a> - for MacOS. </li> + <li><em><u>Bash Command-Line Shell</u></em>: The git instructions in this assignment and in the <em>Pro Git</em> book use Bash, a + particular command-line shell <a href="#WP2023">[WP2023]</a>. You need to have a basic understanding of the Bash shell. If + you are <u>not</u> already familiar with Bash, read the short introduction at <a class="Citation" href="#WART2021">[WART2021]</a>. </li> + <li><em><u>Environment Variables</u></em>: Regarding environment variables, you should know what they are and how to modify + them. In particular knowledge of the PATH environment variable is required. A general discussion is found at <a class="Citation" + + href="#WP2016a">[WP2016a]</a> and with specifics on PATH at <a class="Citation" href="#WP2016b">[WP2016b]</a>. The method + to modify environment variables differs across operating system. See <a class="Citation" href="#Microsoft2016">[Microsoft2016]</a> for + Windows or <a class="Citation" href="#Apple2016">[Apple2016]</a> for MacOS. </li> </ol> </section> <!-- to shorten and simplify instructions I removed the item below. Also increasingly folks are using git plugins for their favored IDE --> <!-- - <section><h2 class="Section" id="Installation_and_Setup_of_Git_GUIs"> [Optional] Installation and Setup of Git GUI’s </h2> <p> Generally, the Git instructions in this document and any Git instructions given in this course will be presented using Git command-line examples. But many GUI Git tools are available as well for different operating systems and different IDE's. Use of GUI Git tools is <u>optional</u>. </p> <ol class="Instruction_Option"> <li> [<em>YourOS</em>=<strong>Window</strong>] <br> Download and install TortoiseGit from <a href="https://tortoisegit.org/" target="_blank">https://tortoisegit.org/</a> </li> <li> [<em>YourOS</em>=<strong>Mac/Linux</strong>] <br> Various Git GUIs are found here <a target="_blank" href="http://git-scm.com/downloads/guis.%20%20">http://git-scm.com/downloads/guis</a>. </li> </ol> </section> - --> </section> - <section class="Instruction_Section" data-optionset="{"name":"Part 2"}" - - data-point-fraction="5"> - <h1 class="Section" id="Git_Server_Access">Part 2: Setting up - Virtual Private Network (VPN)</h1> - A Virtual Private Network (VPN) is a common technology use to ensure - a private, encrypted connection over the public Internet between a - personal computer and enterprise's internal network. In order to - access the CCI GitLab server, cci-git.charlotte.edu, from off-campus - you need to connect to UNCC through a VPN. + <section><h2 class="Section" id="Installation_and_Setup_of_Git_GUIs"> [Optional] Installation and Setup of Git GUI’s </h2> <p> Generally, the Git instructions in this document and any Git instructions given in this course will be presented using Git command-line examples. But many GUI Git tools are available as well for different operating systems and different IDE's. Use of GUI Git tools is <u>optional</u>. </p> <ol class="Instruction_Option"> <li> [<em>YourOS</em>=<strong>Window</strong>] <br> Download and install TortoiseGit from <a href="https://tortoisegit.org/" target="_blank">https://tortoisegit.org/</a> </li> <li> [<em>YourOS</em>=<strong>Mac/Linux</strong>] <br> Various Git GUIs are found here <a target="_blank" href="http://git-scm.com/downloads/guis.%20%20">http://git-scm.com/downloads/guis</a>. </li> </ol> </section> --> + </section> + <section class="Instruction_Section" data-optionset="{"name":"Part 2"}" data-point-fraction="5"> + <h1 class="Section" id="Git_Server_Access">Part 2: Setting up Virtual Private Network (VPN)</h1> + A Virtual Private Network (VPN) is a common technology use to ensure a private, encrypted connection over the public Internet between a personal + computer and enterprise's internal network. In order to access the CCI GitLab server, cci-git.charlotte.edu, from off-campus you need to connect to + UNCC through a VPN. <section class="Instruction_Section" data-point-fraction="50"> <h2 class="Section" id="Git_Server_Access">Installation</h2> - Instructions for installing the required UNCC VPN software are at - this link: <a class="WindowOpenLeft" onclick="windowOpenLeft('https://services.help.charlotte.edu/TDClient/33/Portal/KB/ArticleDet?ID=674','VPN');"> - How do I download and install the UNC Charlotte VPN on my - personal computer? </a> </section> + Instructions for installing the required UNCC VPN software are at this link: <a class="WindowOpenLeft" onclick="windowOpenLeft('https://services.help.charlotte.edu/TDClient/33/Portal/KB/ArticleDet?ID=674','VPN');"> + How do I download and install the UNC Charlotte VPN on my personal computer? </a> </section> <section class="Instruction_Section" data-point-fraction="50"> <h2 class="Section" id="Git_Server_Access">Connecting</h2> - In order to reach cci-git.charlotte.edu either in the web browser - or using the Git client you must connect to UNCC the VPN. - Instructions for connecting to the UNCC VPN are at link below. <a - - class="WindowOpenLeft" onclick="windowOpenLeft('https://services.help.charlotte.edu/TDClient/33/Portal/KB/ArticleDet?ID=677','VPN');"> + In order to reach cci-git.charlotte.edu either in the web browser or using the Git client you must connect to UNCC the VPN. Instructions for + connecting to the UNCC VPN are at link below. <a class="WindowOpenLeft" onclick="windowOpenLeft('https://services.help.charlotte.edu/TDClient/33/Portal/KB/ArticleDet?ID=677','VPN');"> How do I connect to the UNC Charlotte VPN? </a> </section> </section> - <section class="Instruction_Section" data-optionset="{"name":"Part 3"}" - - data-point-fraction="5"> - <h1 class="Section" id="Git_Server_Access">Part 3: Setting up - Account on Git Server</h1> - For this class you will submit your work to the CCI GitLab server, - cci-git.charlotte.edu. For user authentication you will use the git - "Personal Access Token" (PAT) protocol. + <section class="Instruction_Section" data-optionset="{"name":"Part 3"}" data-point-fraction="5"> + <h1 class="Section" id="Git_Server_Access">Part 3: Setting up Account on Git Server</h1> + For this class you will submit your work to the CCI GitLab server, cci-git.charlotte.edu. For user authentication you will use the git "Personal + Access Token" (PAT) protocol. <!-- The sub-sections below list the communication protocols used for the git server in this in class. Use the protocol in the sub-section below that is listed as being recommended for the Git server used in your class.<br> --> <section class="Instruction_Section" data-point-fraction="100"> - <h2 class="Section" id="Git_Server_Access_Token_Protocol"> Git - Server Personal Access Token Protocol</h2> + <h2 class="Section" id="Git_Server_Access_Token_Protocol"> Git Server Personal Access Token Protocol</h2> <!-- I've stopped try to have this document support instructions for multiple servers [<em>YourServer</em>=<strong>cci-git</strong>] --> - <!-- <div class="Server_Supports_HTTPS_PAT"><br> [bug] comment out because the div is causing the rubric generation to fail --> - Follow the instructions below to create your Personal Access Token - (PAT) on cci-git.charlotte.edu. + <!-- <div class="Server_Supports_HTTPS_PAT"><br> [bug] comment out because the div is causing the rubric generation to fail --> Follow the + instructions below to create your Personal Access Token (PAT) on cci-git.charlotte.edu. <ol class="Instruction"> - <li class="Instruction_Todo"><u>Exercise</u>: <b>Creating a - Personal Access Token (PAT):</b><br> - You only have to create the access token once for your cci-git - account. You then write down the PAT token and store it - somewhere safe. The PAT is the password that you will need - when you access the cci-git server from the git client.<br> + <li class="Instruction_Todo"><u>Exercise</u>: <b>Creating a Personal Access Token (PAT):</b><br> + You only have to create the access token once for your cci-git account. You then write down the PAT token and store it somewhere safe. + The PAT is the password that you will need when you access the cci-git server from the git client.<br> <ol> - <li>In your browser sign in to <a href="https://cci-git.charlotte.edu">cci-git.charlotte.edu</a>. - You will be prompted for by the UNCC SSO for your standard - UNCC user id and password. Most likely you will also be - prompted a second time for you UNCC dual-factor + <li>In your browser sign in to <a href="https://cci-git.charlotte.edu">cci-git.charlotte.edu</a>. You will be prompted for by the + UNCC SSO for your standard UNCC user id and password. Most likely you will also be prompted a second time for you UNCC dual-factor authentication. </li> - <li>In the upper-left corner of the cci-git.charlotte.edu - webpage , click on the avatar icon. A dropdown menu will - appear. In that menu, select <span class="File_Name">Preferences</span>. - </li> - <li>On the <span class="Program_Name">Preferences</span> - menu (left side), select <span class="File_Name"> Access - Tokens</span>. </li> - <li>In the new dialog "Personal Access Tokens", select <span - - class="File_Name">Add New Token</span> </li> - <li>In the new dialog "Add a personal access token", choose - a name and optional expiry date for the token. + <li>In the upper-left corner of the cci-git.charlotte.edu webpage , click on the avatar icon. A dropdown menu will appear. In that menu, + select <span class="File_Name">Preferences</span>. </li> + <li>On the <span class="Program_Name">Preferences</span> menu (left side), select <span class="File_Name"> Access Tokens</span>. </li> + <li>In the new dialog "Personal Access Tokens", select <span class="File_Name">Add New Token</span> </li> + <li>In the new dialog "Add a personal access token", choose a name and optional expiry date for the token. <ol> <li>The suggested name is "git-bash"</li> </ol> </li> - <li>For the <a href="https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html#limiting-scopes-of-a-personal-access-token" - - style="box-sizing: border-box; color: rgb(27, 105, 182); text-decoration: none; background-color: transparent;">desired + <li>For the <a href="https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html#limiting-scopes-of-a-personal-access-token" style="box-sizing: border-box; color: rgb(27, 105, 182); text-decoration: none; background-color: transparent;">desired scopes</a>, choose <span class="File_Name">write_repository</span></li> - <li>Click the <span class="File_Name">Create personal - access token</span></li> + <li>Click the <span class="File_Name">Create personal access token</span></li> <li>You should see a dialog similar to the one below: - <figure class="Screen_Capture" tabindex="1"><img src="images/cci-git-your-PAT.png" - - alt="cci-git-your-PAT.png" width="500"></figure> + <figure class="Screen_Capture" tabindex="1"><img src="images/cci-git-your-PAT.png" alt="cci-git-your-PAT.png" width="500"></figure> <ol> <li>Click the "eye" button (#1) to unhide the PAT.</li> <li>Copy the PAT token (#2).</li> - <li>Save (copy and paste) your PAT token somewhere safe, - such as using whatever mechanism you use to store your - various computer passwords.</li> + <li>Save (copy and paste) your PAT token somewhere safe, such as using whatever mechanism you use to store your various computer + passwords.</li> </ol> </li> </ol> </li> - <li class="Instruction_Todo"> <b>Using the Personal Access - Token:</b><br> + <li> <b>Verifying the Server </b><br> + In order to test and verify access to the server, clone the welcome repo:<br> + <table class="Code_Example"> + <tbody style="height: 105px;"> + <tr> + <td><br> + </td> + <td> + <div style="height: 105px;"><code class="Shell_Code_Input">$ git clone https://<span class="User_Input">Your UNCC user id></span>:<span + + class="User_Input">your_access_token</span>@cci-git.charlotte.edu/uncc_graphics_teaching/welcome.git welcome </code><br> + <code class="Shell_Code_Output">Cloning into 'welcome'...<br> + remote: Counting objects: 6, done.<br> + remote: Compressing objects: 100% (4/4), done.<br> + remote: Total 6 (delta 0), reused 0 (delta 0)<br> + Unpacking objects: 100% (6/6), done.<br> + Checking connectivity... done. </code><br> + </div> + </td> + </tr> + </tbody> + </table> + (Note, this welcome.git is <a href="https://docs.gitlab.com/ee/user/public_access.html#public-projects-and-groups">publicly</a> accessible and therefore clone'ing will not trigger the credential manager.) + </li> + <li class="Instruction_Todo"> <b>Using the Personal Access Token:</b><br> <ol> <li> <b>Verifying the Personal Access Token:</b><br> - In order to test and verify access to the server, clone - the welcome repo:<br> + In order to test and verify access to the server, clone the welcome-internal repo. + This welcome-internal.git is <a href="https://docs.gitlab.com/ee/user/public_access.html#internal-projects-and-groups"> internally </a> accessible and will trigger the credential manager. + <br> <table class="Code_Example"> <tbody style="height: 105px;"> <tr> <td><br> </td> <td> - <div style="height: 105px;"><code class="Shell_Code_Input">$ - git clone https://<span class="User_Input">Your - UNCC user id></span>:<span class="User_Input">your_access_token</span>@cci-git.charlotte.edu/uncc_graphics_teaching/welcome.git - welcome </code><br> - <code class="Shell_Code_Output">Cloning into - 'welcome'...<br> + <div style="height: 105px;"><code class="Shell_Code_Input">$ git clone https://<span class="User_Input">Your UNCC user id></span>:<span + + class="User_Input">your_access_token</span>@cci-git.charlotte.edu/uncc_graphics_teaching/welcome-internal.git + welcome-internal </code><br> + <code class="Shell_Code_Output">Cloning into 'welcome-internal'...<br> remote: Counting objects: 6, done.<br> remote: Compressing objects: 100% (4/4), done.<br> remote: Total 6 (delta 0), reused 0 (delta 0)<br> @@ -496,66 +394,41 @@ </tbody> </table> </li> - <li> <b>General Procedure:</b> The above step is - generalized as follows. Assume you want clone a git repo - and the repo URL is as follows:<br> - <br> - <div style="margin-left: 40px;"> - https://cci-git.charlotte.edu/<span class="User_Input">user_or_group_name</span>/<span - - class="User_Input">repo_name</span>.git </div> + <li> <b>General Procedure:</b> The above step is generalized as follows. Assume you want clone a git repo and the repo URL is as follows:<br> <br> - To perform the git clone, you modify the repo URL using - the PAT syntax shown below:<br> + <div style="margin-left: 40px;"> https://cci-git.charlotte.edu/<span class="User_Input">user_or_group_name</span>/<span class="User_Input">repo_name</span>.git + </div> <br> + To perform the git clone, you modify the repo URL using the PAT syntax shown below:<br> <br> - <div style="margin-left: 40px;">git clone https://<code class="Shell_Code_Output"></code><span - - class="User_Input">Your UNCC user id></span>:<span - - class="User_Input">Your_PAT</span>@cci-git.charlotte.edu/<span + <div style="margin-left: 40px;">git clone https://<code class="Shell_Code_Output"></code><span class="User_Input">Your UNCC user id></span>:<span - class="User_Input">user_or_group_name</span>/<span class="User_Input">repo_name</span>.git + class="User_Input">Your_PAT</span>@cci-git.charlotte.edu/<span class="User_Input">user_or_group_name</span>/<span class="User_Input">repo_name</span>.git </div> <br> - However, entering this long augmented URL syntax can be - avoided by installing a Git Credential Manager which is - described next.<br> + However, entering this long augmented URL syntax can be avoided by installing a Git Credential Manager which is described next.<br> </li> </ol> </li> - <li class="Instruction_Todo"> <b>Setting up a Git Credential - Manager:</b> - <p> By default, the PAT protocol requires you to frequently - enter your UNCC username and PAT token. This - also leaves your PAT token visible via the command, git - remote -v.</p> - <p>Therefore you should install a Git Credential Manager which - will securely store your PAT and minimize how often git - requires you to enter you user id and PAT. To install a Git - Credential Manager do the following:</p> + <li class="Instruction_Todo"> <b>Setting up a Git Credential Manager:</b> + <p> By default, the PAT protocol requires you to frequently enter your UNCC username and PAT token. This also leaves your PAT + token visible via the command, git remote -v.</p> + <p>Therefore you should install a Git Credential Manager which will securely store your PAT and minimize how often git requires you to enter + you user id and PAT. To install a Git Credential Manager do the following:</p> <ol> <li> Read ProGit <a class="WindowOpenLeft" onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Git-Tools-Credential-Storage','ProGit');"> - Git Tools - Credential Storage</a>, stopping <ins datetime="8/29/2024"><span - - class="Updated_Text_Popup_Note">grammar change for - clarification</span>before</ins> section "Under the - Hood". <br> - Based on your operating system pick the appropriate - credential system as described in the above ProGit - chapter.<br> + Git Tools - Credential Storage</a>, stopping <ins datetime="8/29/2024"><span class="Updated_Text_Popup_Note">grammar change for + clarification</span>before</ins> section "Under the Hood". <br> + Based on your operating system pick the appropriate credential system as described in the above ProGit chapter.<br> </li> <!-- - <li> <br> <strong><u>Warning</u></strong>: Do <strong>NOT </strong>use "store mode" because this will save your UNCC password unencrypted on disk! <ol class="Instruction_Option"> <li> [<em>OS</em>=<strong>Windows</strong>] Assuming you are using Git-Bash <table class="Code_Example"> <tbody> <tr> <td> <button>▽</button> </td> <td><code class="Shell_Code_Input"> $ git config --global credential.helper manager<br> </code></td> - </tr> </tbody> </table> </li> <li> [<em>OS</em><strong>=<em>everything else</em></strong>] Follow links discussed in <a class="WindowOpenLeft" onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Git-Tools-Credential-Storage','ProGit');"> Git Tools - Credential Storage </a>. </li> </ol> </li> --> + <li> <br> <strong><u>Warning</u></strong>: Do <strong>NOT </strong>use "store mode" because this will save your UNCC password unencrypted on disk! <ol class="Instruction_Option"> <li> [<em>OS</em>=<strong>Windows</strong>] Assuming you are using Git-Bash <table class="Code_Example"> <tbody> <tr> <td> <button>▽</button> </td> <td><code class="Shell_Code_Input"> $ git config --global credential.helper manager<br> </code></td> </tr> </tbody> </table> </li> <li> [<em>OS</em><strong>=<em>everything else</em></strong>] Follow links discussed in <a class="WindowOpenLeft" onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Git-Tools-Credential-Storage','ProGit');"> Git Tools - Credential Storage </a>. </li> </ol> </li> --> </ol> </li> - <li class="Instruction_Todo"> <b>Verify the Credential Manager - </b><br> + <li class="Instruction_Todo"> <b>Verify the Credential Manager </b><br> To test the Credential Manager, perform the following steps:<br> <ol class="Instructions"> <li> To test read-access to the server, clone the <!-- - <ins datetime="8/28/2024"> <span class="Updated_Text_Popup_Note">A new welcome-internal repo with was created on 8/28 in order to generate the Credential Manager prompt (Because the original welcome repo is assigned "public" access, cloning it was not reliably triggering the Credential Manager). </span> - internal </ins> --> + <ins datetime="8/28/2024"> <span class="Updated_Text_Popup_Note">A new welcome-internal repo with was created on 8/28 in order to generate the Credential Manager prompt (Because the original welcome repo is assigned "public" access, cloning it was not reliably triggering the Credential Manager). </span> internal </ins> --> welcome repo's below:<br> <table class="Code_Example"> <tbody style="height: 105px;"> @@ -563,12 +436,9 @@ <td><br> </td> <td> - <div style="height: 105px;"><code class="Shell_Code_Input">$ - git clone - https://cci-git.charlotte.edu/uncc_graphics_teaching/welcome.git - welcome-2 </code><br> - <code class="Shell_Code_Output">Cloning into - 'welcome'...<br> + <div style="height: 105px;"><code class="Shell_Code_Input">$ git clone + https://cci-git.charlotte.edu/uncc_graphics_teaching/welcome.git welcome-2 </code><br> + <code class="Shell_Code_Output">Cloning into 'welcome'...<br> remote: Counting objects: 6, done.<br> remote: Compressing objects: 100% (4/4), done.<br> remote: Total 6 (delta 0), reused 0 (delta 0)<br> @@ -580,21 +450,15 @@ </tbody> </table> </li> - <li> A dialog box will appear, prompting you for a UNCC user - id ID and PAT token. Enter this information. <br> + <li> A dialog box will appear, prompting you for a UNCC user id ID and PAT token. Enter this information. <br> <br> - The Credential Manager will record your PAT and store it - on your computer. Afterwards, when you give the git client - a git repo URL of the form: - <blockquote> https://cci-git.charlotte.edu/<span class="User_Input">user_or_group_name</span>/<span - - class="User_Input">repo_name</span>.git </blockquote> - the git client will automatically retrieve your PAT from - the Credential Manager. <br> + The Credential Manager will record your PAT and store it on your computer. Afterwards, when you give the git client a git repo URL of the + form: + <blockquote> https://cci-git.charlotte.edu/<span class="User_Input">user_or_group_name</span>/<span class="User_Input">repo_name</span>.git + </blockquote> the git client will automatically retrieve your PAT from the Credential Manager. <br> <br> - If problems arise with the Credential Manager, you can - fallback on specifying the repo URL using the PAT syntax - discussed in 2.b <b>General Procedure</b> above. </li> + If problems arise with the Credential Manager, you can fallback on specifying the repo URL using the PAT syntax discussed in 2.b <b>General + Procedure</b> above. </li> <!-- <li> Note, the PAT is recorded by the Credential Manager and not visible via git remote -v.<br> <table class="Code_Example" > <tbody style="height: 60px;"> <tr> <td><br> </td> <td> <div style="height: 60px;"><code class="Shell_Code_Input">$ git remote -v</code><br> <code class="Shell_Code_Output">origin https://</code><code class="Shell_Code_Output">cci-git.charlotte.edu/zwartell/welcome.git (fetch)<br> origin https://</code><code class="Shell_Code_Output">@cci-git.charlotte.edu/zwartell/welcome.git (push) </code><br> </div> </td> </tr> </tbody> </table> </li> --> </ol> @@ -602,152 +466,81 @@ </ol> <!-- </div> --> </section> <!-- - <section hidden="true"><h2 class="Section" id="Accessing_Git_Server_Using_SSH_Keys">Git Server SSH Protocol </h2> [<em>YourServer</em>=<strong>cci-git.charlotte.edu</strong>] - SSH is not recommended for cci-git. Skip this section. <div class="StaffNote"> <ul> <li><em>Staff Note: </em>Since it's inception, cci-git.charlotte.edu we had limited success using the ssh protocol. UNCC wireless seemed to block ssh or drop ssh connections intermittently. Further, sometime in 2019/2020 (?) UNCC OneIT seems to have blocked all off-campus ssh access, even for faculty connecting with VPN. Experience with OneIT indicates their security lock down is unlikely to ever to be rescinded.<br> </li> </ul> </div> <br> - [<em>YourServer</em>=<strong>Bitbucket</strong>] <div class="Server_Supports_SSH" hidden="true"> <p>For servers using the SSH access method, this section covers:</p> <ol start="1" type="1"> <li> Starting and logging into an <span class="Program_Name">ssh-agent</span> daemon in a command-line. <br> </li> <li>Example Git operations using the Git server.</li> </ol> <section> <h4 class="Appendix" id="LinuxMac_Starting_the_ssh-agent_daemon"> <a name="LinuxMac_Starting_the_ssh-agent"></a>[Linux/Mac] Starting the ssh-agent daemon </h4> <div class="OS_Mac OS_Unix"> <p> These steps much be done each time you login into a computer if you want to access the Git server. They start - the ssh-agent daemon process which manages Git’s authentication to the Git server. </p> <p> These steps will only work after you submit you public key to the TA and he has confirmed that it has been added to the Git server. </p> <ol class="Instruction"> <li>Start your command-line shell</li> <li> Start the <span class="Program_Name">ssh-agent</span> daemon process<br> This starts a <span class="Program_Name">ssh-agent</span> daemon and a new bash shell that is setup to communicate with the <span class="Program_Name">ssh-agent</span> daemon.<br> <br> </li> <li>Load your private key into the ssh-agent daemon.</li> - <li> To verify ssh-agent access: <ol> <li> [<em>YourServer=</em><strong>cci-git</strong>]<br> <table class="Code_Example" id="Code_Example_741_4c"> <tbody style="height: 105px;"> <tr> <td> <button onclick="Code_Example_Toggle('Code_Example_741_4c');"> ▽ </button> </td> <td> <div style="height: 105px;"><code class="Shell_Code_Input"> $ ssh git@cci-git.charlotte.edu<br> </code> <code class="Shell_Code_Output"> <br> The server's host key is not cached in the registry. You <br> have no guarantee that the server is the computer you <br> - think it is. <br> The server's rsa2 key fingerprint is: <br> ssh-rsa 2048 aa:32:4a:f4:4e:96:bc:cb:46:3d:b9:de:64:bc:19:ef ) <br> <span class="Shell_Code_Comment"> [^ exact number may differ ^] </span> <br> If you trust this host, enter "y" to add the key to <br> PuTTY's cache and carry on connecting. <br> If you want to carry on connecting just once, without <br> adding the key to the cache, enter "n". <br> If you do not trust this host, press Return to abandon the <br> connection. <br> - Store key in cache? (y/n) <span class="Shell_Code_Comment"> [TYPE yes] </span> <br> Warning: Permanently added ‘cci-subv.uncc.edu,10.18.2013.162’ (RSA) to the list of known hosts. <br> Using username "git". <br> Server refused to allocate pty <br> Welcome to GitLab, zwartell. <span class="Shell_Code_Comment"> [zwartell will be your username] </span> </code></div> </td> </tr> </tbody> </table> </li> <li> [<em>YourServer=</em><strong>bitbucket</strong>]<br> - The above<strong> </strong>verifies<strong> </strong>your<strong> </strong>ssh-agent is successfully passing your key through ssh to Bitbucket. </li> </ol> </li> <li> To verify read-access to the welcome repo do as follows:<br> <br> For input text <span class="User_Input">welcome_repo_path</span> below, substitute the following based on your server:: <ol class="Instruction_Option"> <li> [<strong>cci-git</strong>] git@cci-git.charlotte.edu:zwartell/welcome.git </li> <li hidden="true"> [<strong>bitbucket</strong>] git@bitbucket.org:zwartell/welcome.git </li> </ol> - <table class="Code_Example" id="Code_Example_741_5"> <tbody style="height: 105px;"> <tr> <td> <button onclick="Code_Example_Toggle('Code_Example_741_5');">▽</button> </td> <td> <div style="height: 105px;"><code class="Shell_Code_Input"> $ git clone <span class="User_Input">welcome_repo_path</span> <br> </code> <code class="Shell_Code_Output"> <br> The authenticity of host ‘cci-subv.uncc.edu’ (10.18.203.162)’ can’t be established.<br> RSA key fingerprint is e2:6f:ac:ff:a3:30:a2:0e:c2:d6:98:f4:78:55:c5:7f.<br> Are you sure you want to continue connecting (yes/no)? <span class="Shell_Code_Comment"> - [type yes] </span><br> Warning: Permanently added ‘cci-subv.uncc.edu,10.18.2013.162’ (RSA) to the list of known hosts.<br> <span class="Shell_Code_Comment"> […the above will only appear the first time you connect to the git-viscenter …] </span><br> Cloning into 'welcome'...<br> remote: Counting objects: 6, done.<br> remote: Compressing objects: 100% (4/4), done.<br> remote: Total 6 (delta 0), reused 0 (delta 0)<br> Receiving objects: 100% (6/6), 5.50 KiB | 0 bytes/s, done.<br> </code></div> </td> </tr> - </tbody> </table> <em> <u> <br> Possible Errors </u> </em>: If you are prompted for a password here, either the ssh-agent daemon is not setup right or your public key has not been registered yet. </li> </ol> </div> </section> <section> <h4 class="Appendix" id="Windows_Starting_the_ssh-agent_daemon"> [Windows] Starting the ssh-agent daemon </h4> <div class="OS_Windows"> <p> When you login into a computer from which want to connect to your Git server, you must perform these steps once. The steps start the ssh-agent daemon which manages Git’s - authentication to the Git server. <br> <br> These steps will only work after you submit your public key to the Git server. <br> <br> These instructions allow both TortoiseGit and command-line Git to use the same <span class="Program_Name">ssh-agent</span> daemon. </p> <p><u>Start Pageant</u></p> <ol> <li> Run Pageant: <br> General: <span class="Program_Name"> Start Menu→Putty→Pagent </span> <br> This will create a Pageant system tray icon.<br> </li> <li> On the Pageant system tray icon, right-click and select - <span class="Program_Name">Add Keys</span> from the menu. This will open a dialog box. </li> <li> Using the dialog, open your <span class="File_Name">id_rsa.ppk</span> file. You will be prompted for your passphrase. <br> <br> This starts PuTTY’s version of the ssh-agent daemon. The ssh-agent will continue to run until you log off your computer. <p><u>Start and Use the Command-Line Shell</u></p> </li> <li>Start the Git-Bash shell: Start Menu→Git→Git-Bash</li> <li> To tell git to use the ssh client compatible with TortoiseGit type the following: <br> <br> General:<br> <br> - Optionally to avoid the requirement of setting the GIT_SSH variable each time you run Git-Bash, add the above line to the <span class="File_Name">.bash_profile</span> file (see Appendix 11.2). <br> </li> <li> To verify the Pagent ssh-agent daemon is working: <ol class="Instruction_Option Instruction_NonRubric"> <li>[<em>YourServer</em>=<strong>bitbucket</strong>]</li> <li> [<em>YourServer=</em><strong>cci-git</strong>]<br> </li> </ol> </li> <li> To verify read-access to the <span class="File_Name">welcome</span> repo:<br> <br> For input text <span class="User_Input">welcome_repo_path</span> - below, substitute the following based on your server:: <ol class="Instruction_Option Instruction_NonRubric"> <li> [<strong>bitbucket</strong>] git@bitbucket.org:zwartell/welcome.git </li> <li> [<strong>cci-git</strong>] git@cci-git.charlotte.edu:zwartell/welcome.git<br> <br> </li> </ol> <em><u>Possible Errors</u></em>: If you are prompted for a password here, either the ssh-agent daemon is not setup right or your public key has not been registered yet. </li> </ol> </div> </section> - </div> </section> --> + <section hidden="true"><h2 class="Section" id="Accessing_Git_Server_Using_SSH_Keys">Git Server SSH Protocol </h2> [<em>YourServer</em>=<strong>cci-git.charlotte.edu</strong>] - SSH is not recommended for cci-git. Skip this section. <div class="StaffNote"> <ul> <li><em>Staff Note: </em>Since it's inception, cci-git.charlotte.edu we had limited success using the ssh protocol. UNCC wireless seemed to block ssh or drop ssh connections intermittently. Further, sometime in 2019/2020 (?) UNCC OneIT seems to have blocked all off-campus ssh access, even for faculty connecting with VPN. Experience with OneIT indicates their security lock down is unlikely to ever to be rescinded.<br> </li> </ul> </div> <br> [<em>YourServer</em>=<strong>Bitbucket</strong>] <div class="Server_Supports_SSH" hidden="true"> <p>For servers using the SSH access method, this section covers:</p> <ol start="1" type="1"> <li> Starting and logging into an <span class="Program_Name">ssh-agent</span> daemon in a command-line. <br> </li> <li>Example Git operations using the Git server.</li> </ol> <section> <h4 class="Appendix" id="LinuxMac_Starting_the_ssh-agent_daemon"> <a name="LinuxMac_Starting_the_ssh-agent"></a>[Linux/Mac] Starting the ssh-agent daemon </h4> <div class="OS_Mac OS_Unix"> <p> These steps much be done each time you login into a computer if you want to access the Git server. They start the ssh-agent daemon process which manages Git’s authentication to the Git server. </p> <p> These steps will only work after you submit you public key to the TA and he has confirmed that it has been added to the Git server. </p> <ol class="Instruction"> <li>Start your command-line shell</li> <li> Start the <span class="Program_Name">ssh-agent</span> daemon process<br> This starts a <span class="Program_Name">ssh-agent</span> daemon and a new bash shell that is setup to communicate with the <span class="Program_Name">ssh-agent</span> daemon.<br> <br> </li> <li>Load your private key into the ssh-agent daemon.</li> <li> To verify ssh-agent access: <ol> <li> [<em>YourServer=</em><strong>cci-git</strong>]<br> <table class="Code_Example" id="Code_Example_741_4c"> <tbody style="height: 105px;"> <tr> <td> <button onclick="Code_Example_Toggle('Code_Example_741_4c');"> ▽ </button> </td> <td> <div style="height: 105px;"><code class="Shell_Code_Input"> $ ssh git@cci-git.charlotte.edu<br> </code> <code class="Shell_Code_Output"> <br> The server's host key is not cached in the registry. You <br> have no guarantee that the server is the computer you <br> + think it is. <br> The server's rsa2 key fingerprint is: <br> ssh-rsa 2048 aa:32:4a:f4:4e:96:bc:cb:46:3d:b9:de:64:bc:19:ef ) <br> <span class="Shell_Code_Comment"> [^ exact number may differ ^] </span> <br> If you trust this host, enter "y" to add the key to <br> PuTTY's cache and carry on connecting. <br> If you want to carry on connecting just once, without <br> adding the key to the cache, enter "n". <br> If you do not trust this host, press Return to abandon the <br> connection. <br> Store key in cache? (y/n) <span class="Shell_Code_Comment"> [TYPE yes] </span> <br> Warning: Permanently added ‘cci-subv.uncc.edu,10.18.2013.162’ (RSA) to the list of known hosts. <br> Using username "git". <br> Server refused to allocate pty <br> Welcome to GitLab, zwartell. <span class="Shell_Code_Comment"> [zwartell will be your username] </span> </code></div> </td> </tr> </tbody> </table> </li> <li> [<em>YourServer=</em><strong>bitbucket</strong>]<br> The above<strong> </strong>verifies<strong> </strong>your<strong> </strong>ssh-agent is successfully passing your key through ssh to Bitbucket. </li> </ol> </li> <li> To verify read-access to the welcome repo do as follows:<br> <br> For input text <span class="User_Input">welcome_repo_path</span> below, substitute the following based on your server:: <ol class="Instruction_Option"> <li> [<strong>cci-git</strong>] git@cci-git.charlotte.edu:zwartell/welcome.git </li> <li hidden="true"> [<strong>bitbucket</strong>] git@bitbucket.org:zwartell/welcome.git </li> </ol> <table class="Code_Example" id="Code_Example_741_5"> <tbody style="height: 105px;"> <tr> <td> <button onclick="Code_Example_Toggle('Code_Example_741_5');">▽</button> </td> <td> <div style="height: 105px;"><code class="Shell_Code_Input"> $ git clone <span class="User_Input">welcome_repo_path</span> <br> </code> <code class="Shell_Code_Output"> <br> The authenticity of host ‘cci-subv.uncc.edu’ (10.18.203.162)’ can’t be established.<br> RSA key fingerprint is e2:6f:ac:ff:a3:30:a2:0e:c2:d6:98:f4:78:55:c5:7f.<br> Are you sure you want to continue connecting (yes/no)? <span class="Shell_Code_Comment"> + [type yes] </span><br> Warning: Permanently added ‘cci-subv.uncc.edu,10.18.2013.162’ (RSA) to the list of known hosts.<br> <span class="Shell_Code_Comment"> […the above will only appear the first time you connect to the git-viscenter …] </span><br> Cloning into 'welcome'...<br> remote: Counting objects: 6, done.<br> remote: Compressing objects: 100% (4/4), done.<br> remote: Total 6 (delta 0), reused 0 (delta 0)<br> Receiving objects: 100% (6/6), 5.50 KiB | 0 bytes/s, done.<br> </code></div> </td> </tr> </tbody> </table> <em> <u> <br> Possible Errors </u> </em>: If you are prompted for a password here, either the ssh-agent daemon is not setup right or your public key has not been registered yet. </li> </ol> </div> </section> <section> <h4 class="Appendix" id="Windows_Starting_the_ssh-agent_daemon"> [Windows] Starting the ssh-agent daemon </h4> <div class="OS_Windows"> <p> When you login into a computer from which want to connect to your Git server, you must perform these steps once. The steps start the ssh-agent daemon which manages Git’s authentication to the Git server. <br> <br> These steps will only work after you submit your public key to the Git server. <br> <br> These instructions allow both TortoiseGit and command-line Git to use the same <span class="Program_Name">ssh-agent</span> daemon. </p> <p><u>Start Pageant</u></p> <ol> <li> Run Pageant: <br> General: <span class="Program_Name"> Start Menu→Putty→Pagent </span> <br> This will create a Pageant system tray icon.<br> </li> <li> On the Pageant system tray icon, right-click and select <span class="Program_Name">Add Keys</span> from the menu. This will open a dialog box. </li> <li> Using the dialog, open your <span class="File_Name">id_rsa.ppk</span> file. You will be prompted for your passphrase. <br> <br> This starts PuTTY’s version of the ssh-agent daemon. The ssh-agent will continue to run until you log off your computer. <p><u>Start and Use the Command-Line Shell</u></p> </li> <li>Start the Git-Bash shell: Start Menu→Git→Git-Bash</li> <li> To tell git to use the ssh client compatible with TortoiseGit type the following: <br> <br> General:<br> <br> + Optionally to avoid the requirement of setting the GIT_SSH variable each time you run Git-Bash, add the above line to the <span class="File_Name">.bash_profile</span> file (see Appendix 11.2). <br> </li> <li> To verify the Pagent ssh-agent daemon is working: <ol class="Instruction_Option Instruction_NonRubric"> <li>[<em>YourServer</em>=<strong>bitbucket</strong>]</li> <li> [<em>YourServer=</em><strong>cci-git</strong>]<br> </li> </ol> </li> <li> To verify read-access to the <span class="File_Name">welcome</span> repo:<br> <br> For input text <span class="User_Input">welcome_repo_path</span> below, substitute the following based on your server:: <ol class="Instruction_Option Instruction_NonRubric"> <li> [<strong>bitbucket</strong>] git@bitbucket.org:zwartell/welcome.git </li> <li> [<strong>cci-git</strong>] git@cci-git.charlotte.edu:zwartell/welcome.git<br> <br> </li> </ol> <em><u>Possible Errors</u></em>: If you are prompted for a password here, either the ssh-agent daemon is not setup right or your public key has not been registered yet. </li> </ol> </div> </section> </div> </section> --> <!-- - <section hidden="true"> <h2 class="Section" id="Accessing_Git_Server_Using_HTTPS_and_Credentials"><a name="Accessing_Git_Server_Using_HTTPS_and_Git"></a> with UNCC SSO and Credential Manager</h2> [<em>YourServer</em>=<strong>cci-git</strong>] Use the <a href="#Git_Server_Access_Token_Protocol">Git Server Personal Access Token Protocol</a> instead. <div class="StaffNote"> <ul> <li><em>Staff Note</em>: The SSO protocol worked throughout the exitence of cci-git.charlotte.edu until Spring 2020. Starting Fall 2020, cci-git no longer worked reliably with this protocol. </li> </ul> </div> <div class="Server_Supports_HTTPS"> <section> <h4 class="Appendix" id="cci-git-activate-UNCC-account"> Activate and Verify UNCC Account </h4> <p> If you have never used cci-git.charlotte.edu before, your UNCC - account will need to be activated. To activate your UNCC account you need to log into <a href="https://cci-git.charlotte.edu/" target="_blank">cci-git.charlotte.edu</a> via a web browser. During this first login, cci-git.charlotte.edu creates an account for you that will henceforth your UNCC's Single-Sign-On (SSO) username and password. </p> <p><u>Verify Activation of Account<em>:</em></u></p> <p> To verify activation you will clone a repo from <span class="Server_Name">cci-git</span> using the command-line.<br> </p> <p> First, as of September 2016, there is a problem with the <span class="Server_Name">cci-git </span> server's SSL certificate. You should disable Git’s automatic checkings for a SSL certificate as follows: </p> - <table class="Code_Example" id="Code_Example_751_1"> <tbody> <tr> <td> <button onclick="Code_Example_Toggle('Code_Example_751_1');">▽</button> </td> <td><code class="Shell_Code_Input"> $ git config --global http.sslVerify false<br> </code></td> </tr> </tbody> </table> (The above Git setting is saved on your computer, so you only need to set it once).<br> <p></p> <p> Now, to test and verify read-access to the server, clone the welcome repo: </p> - <table class="Code_Example"> <tbody style="height: 105px;"> <tr> <td> <button onclick="Code_Example_Toggle('Code_Example_75_1');"></button> </td> <td> <div style="height: 105px;"><code class="Shell_Code_Input"> $ git clone https://cci-git.charlotte.edu/zwartell/welcome.git </code><br> <span class="Shell_Code_Comment"> […you will prompted for you UNCC user id and password] </span><br> <code class="Shell_Code_Output"> Cloning into 'welcome'...<br> remote: Counting objects: 6, done.<br> remote: Compressing objects: 100% (4/4), done.<br> remote: Total 6 (delta 0), reused 0 (delta 0)<br> - Unpacking objects: 100% (6/6), done.<br> Checking connectivity... done. </code><br> </div> </td> </tr> </tbody> </table> <p></p> <p> The next section discusses how to avoid repeatedly entering your username and password when using the shell. </p> </section> <section> <h4 class="Appendix" id="Using_Git_Credentials"> Using Git HTTPS Protocol with Git Credential Manager</h4> <p> By default, the HTTPS protocol will require you to enter your UNCC username and password <u>everytime</u> you perform - a <u>remote</u> Git operation (clone, push, etc.). To save typing, you may use the Git Credential Storage mechanism to avoid typing in a password over and over again.<br> <br> Note, the instructions below are a repetition of those found in this document Section <a href="#Full_Git_Tutorial">Full_Git_Tutorial</a>. </p> <ol> <li> Read ProGit <a class="WindowOpenLeft" onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Git-Tools-Credential-Storage','ProGit');"> Git Tools - Credential Storage </a>. Stop at section Under the Hood. <br> </li> <li> Based on your operating system pick the appropriate credential system as described in the above ProGit chapter.<br> <br> - <strong><u>Warning</u></strong>: Do <strong>NOT </strong>use "store mode" because this will save your UNCC password unencrypted on disk! <ol class="Instruction_Option Instruction_NonRubric"> <li> [<em>OS</em>=<strong>Windows</strong>] Assuming you are using Git-Bash <table class="Code_Example"> <tbody> <tr> <td> <button onclick="Code_Example_Toggle('Code_Example_751_2');">▽ </button> </td> <td><code class="Shell_Code_Input"> $ git config --global credential.helper manager<br> </code></td> </tr> </tbody> - </table> </li> <li> [<em>OS</em><strong>=<em>everything else</em></strong>] Follow links discussed in <a class="WindowOpenLeft" onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Git-Tools-Credential-Storage','ProGit');"> Git Tools - Credential Storage </a>. </li> </ol> </li> </ol> </section> </div> </section> --> + <section hidden="true"> <h2 class="Section" id="Accessing_Git_Server_Using_HTTPS_and_Credentials"><a name="Accessing_Git_Server_Using_HTTPS_and_Git"></a> with UNCC SSO and Credential Manager</h2> [<em>YourServer</em>=<strong>cci-git</strong>] Use the <a href="#Git_Server_Access_Token_Protocol">Git Server Personal Access Token Protocol</a> instead. <div class="StaffNote"> <ul> <li><em>Staff Note</em>: The SSO protocol worked throughout the exitence of cci-git.charlotte.edu until Spring 2020. Starting Fall 2020, cci-git no longer worked reliably with this protocol. </li> </ul> </div> <div class="Server_Supports_HTTPS"> <section> <h4 class="Appendix" id="cci-git-activate-UNCC-account"> Activate and Verify UNCC Account </h4> <p> If you have never used cci-git.charlotte.edu before, your UNCC account will need to be activated. To activate your UNCC account you need to log into <a href="https://cci-git.charlotte.edu/" target="_blank">cci-git.charlotte.edu</a> via a web browser. During this first login, cci-git.charlotte.edu creates an account for you that will henceforth your UNCC's Single-Sign-On (SSO) username and password. </p> <p><u>Verify Activation of Account<em>:</em></u></p> <p> To verify activation you will clone a repo from <span class="Server_Name">cci-git</span> using the command-line.<br> </p> <p> First, as of September 2016, there is a problem with the <span class="Server_Name">cci-git </span> server's SSL certificate. You should disable Git’s automatic checkings for a SSL certificate as follows: </p> <table class="Code_Example" id="Code_Example_751_1"> <tbody> <tr> <td> <button onclick="Code_Example_Toggle('Code_Example_751_1');">▽</button> </td> <td><code class="Shell_Code_Input"> $ git config --global http.sslVerify false<br> </code></td> </tr> </tbody> </table> (The above Git setting is saved on your computer, so you only need to set it once).<br> <p></p> <p> Now, to test and verify read-access to the server, clone the welcome repo: </p> <table class="Code_Example"> <tbody style="height: 105px;"> <tr> <td> <button onclick="Code_Example_Toggle('Code_Example_75_1');"></button> </td> <td> <div style="height: 105px;"><code class="Shell_Code_Input"> $ git clone https://cci-git.charlotte.edu/zwartell/welcome.git </code><br> <span class="Shell_Code_Comment"> […you will prompted for you UNCC user id and password] </span><br> <code class="Shell_Code_Output"> Cloning into 'welcome'...<br> remote: Counting objects: 6, done.<br> remote: Compressing objects: 100% (4/4), done.<br> remote: Total 6 (delta 0), reused 0 (delta 0)<br> + Unpacking objects: 100% (6/6), done.<br> Checking connectivity... done. </code><br> </div> </td> </tr> </tbody> </table> <p></p> <p> The next section discusses how to avoid repeatedly entering your username and password when using the shell. </p> </section> <section> <h4 class="Appendix" id="Using_Git_Credentials"> Using Git HTTPS Protocol with Git Credential Manager</h4> <p> By default, the HTTPS protocol will require you to enter your UNCC username and password <u>everytime</u> you perform a <u>remote</u> Git operation (clone, push, etc.). To save typing, you may use the Git Credential Storage mechanism to avoid typing in a password over and over again.<br> <br> Note, the instructions below are a repetition of those found in this document Section <a href="#Full_Git_Tutorial">Full_Git_Tutorial</a>. </p> <ol> <li> Read ProGit <a class="WindowOpenLeft" onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Git-Tools-Credential-Storage','ProGit');"> Git Tools - Credential Storage </a>. Stop at section Under the Hood. <br> </li> <li> Based on your operating system pick the appropriate credential system as described in the above ProGit chapter.<br> <br> <strong><u>Warning</u></strong>: Do <strong>NOT </strong>use "store mode" because this will save your UNCC password unencrypted on disk! <ol class="Instruction_Option Instruction_NonRubric"> <li> [<em>OS</em>=<strong>Windows</strong>] Assuming you are using Git-Bash <table class="Code_Example"> <tbody> <tr> <td> <button onclick="Code_Example_Toggle('Code_Example_751_2');">▽ </button> </td> <td><code class="Shell_Code_Input"> $ git config --global credential.helper manager<br> </code></td> </tr> </tbody> </table> </li> <li> [<em>OS</em><strong>=<em>everything else</em></strong>] Follow links discussed in <a class="WindowOpenLeft" onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Git-Tools-Credential-Storage','ProGit');"> Git Tools - Credential Storage </a>. </li> </ol> </li> </ol> </section> </div> </section> --> </section> <section> - <h1 class="Section" id="Full_vs_Micro_Tutorial">Full Tutorial vs - Micro Tutorial Option</h1> - <p>For Part 4, you must complete exactly <u>one</u> of the two - options below. </p> + <h1 class="Section" id="Full_vs_Micro_Tutorial">Full Tutorial vs Micro Tutorial Option</h1> + <p>For Part 4, you must complete exactly <u>one</u> of the two options below. </p> <ol> - <li>Option I - <a href="#Part4_OptionI">Full Git Tutorial - Tutorial</a>: This option requires reading - chapters in the ProGit book and completing a number of - exercises. Option I introduces you to git and the git - command-line interface using the Bash command-line shell. With - Option I, this assignment is worth 120 pts total (<a href="#RubricAwardedPoints">Rubric - Awarded Points</a>). </li> - <li>Option II - <u><a href="#Part4_OptionII">The Micro Git - Tutorial:</a></u> This option is only for students already - familiar with Git and the Git command-line interface using Bash. - With Option II, this assignment is worth 36 pts total (<a href="#RubricAwardedPoints">Rubric - Awarded Points</a>). </li> + <li>Option I - <a href="#Part4_OptionI">Full Git Tutorial Tutorial</a>: This option requires reading chapters in the ProGit book and + completing a number of exercises. Option I introduces you to git and the git command-line interface using the Bash command-line shell. With + Option I, this assignment is worth 120 pts total (<a href="#RubricAwardedPoints">Rubric Awarded Points</a>). </li> + <li>Option II - <u><a href="#Part4_OptionII">The Micro Git Tutorial:</a></u> This option is only for students already familiar with Git and the + Git command-line interface using Bash. With Option II, this assignment is worth 36 pts total (<a href="#RubricAwardedPoints">Rubric Awarded + Points</a>). </li> </ol> - <p> If you are uncertain about which option to choose, skim over - Chapter 1 and 2 of the ProGit book (<a href="http://git-scm.com/book/en/v2/" - - target="_blank">http://git-scm.com/book/en/v2/</a>), and skim - over "Unix Primer - Basic Commands In the Unix" <a href="WART2021">[WART2021]</a>. - If you already know the material covered in these readings, you - should complete Option II; otherwise you should complete Option I. - </p> + <p> If you are uncertain about which option to choose, skim over Chapter 1 and 2 of the ProGit book (<a href="http://git-scm.com/book/en/v2/" target="_blank">http://git-scm.com/book/en/v2/</a>), + and skim over "Unix Primer - Basic Commands In the Unix" <a href="WART2021">[WART2021]</a>. If you already know the material covered in these + readings, you should complete Option II; otherwise you should complete Option I. </p> </section> - <section class="Instruction_Section" data-optionset="{"name":"Part 4"}" - - data-point-fraction="80"><span id="Part4_OptionI"></span> - <h1 id="Full_Git_Tutorial" class="Section">Part 4: Option I: Full - Git Tutorial</h1> - The instructions below guide you through reading chapters in the - ProGit Book, 2<sup>nd</sup> Edition at <a class="WindowOpenLeft" onclick="windowOpenLeft('http://git-scm.com/book/en/v2/','ProGit');"> - http://git-scm.com/book/en/<span style="background:yellow">v2</span>/. - <br> </a> - <p>For the instructions steps that are labeled as “<u>Exercise</u>: - PG: <i>Section_Name”</i>, you need to perform the details in the - ProGit ("PG") book section named "<i>Section_Name" </i>and save - your work to local files. </p> + <section class="Instruction_Section" data-optionset="{"name":"Part 4"}" data-point-fraction="80"><span id="Part4_OptionI"></span> + <h1 id="Full_Git_Tutorial" class="Section">Part 4: Option I: Full Git Tutorial</h1> + The instructions below guide you through reading chapters in the ProGit Book, 2<sup>nd</sup> Edition at <a class="WindowOpenLeft" onclick="windowOpenLeft('http://git-scm.com/book/en/v2/','ProGit');"> + http://git-scm.com/book/en/<span style="background:yellow">v2</span>/. <br> + </a> + <p>For the instructions steps that are labeled as “<u>Exercise</u>: PG: <i>Section_Name”</i>, you need to perform the details in the ProGit ("PG") + book section named "<i>Section_Name" </i>and save your work to local files. </p> <ol class="Instruction"> - <li class="Instruction_Todo" data-point-fraction="5"><u>Exercise</u><strong>: - </strong>This tutorial and all later projects in the course, - assume you have created a 'course' directory that will contain - further sub-directories, one subdirectory per tutorial or - project. You should create the course directory - now. Name the course directory using your course - number, such as "ITCS_<span class="DataField" data-course-number=""></span>". - In this and later assignments the bash code examples will use - the name ITCS_<span class="DataField" data-course-number=""></span> - in order keep the instruction text generic. If your course - number differs, you should substitute the appropriate course - number after the <em>ITCS_.</em><br> + <li class="Instruction_Todo" data-point-fraction="5"><u>Exercise</u><strong>: </strong>This tutorial and all later projects in the course, + assume you have created a 'course' directory that will contain further sub-directories, one subdirectory per tutorial or project. + You should create the course directory now. Name the course directory using your course number, such as "ITCS_<span class="DataField" + + data-course-number=""></span>". In this and later assignments the bash code examples will use the name ITCS_<span class="DataField" + + data-course-number=""></span> in order keep the instruction text generic. If your course number differs, you should substitute the appropriate + course number after the <em>ITCS_.</em><br> <table class="Code_Example"> <tbody style="height: 75px;"> <tr> - <td> <button onclick="Code_Example_Toggle('Code_Example_0_3ai');">▽</button> - </td> + <td> <button onclick="Code_Example_Toggle('Code_Example_0_3ai');">▽</button> </td> <td> - <div style="height: 75px;"> <code class="Shell_Code_Input"></code><code + <div style="height: 75px;"> <code class="Shell_Code_Input"></code><code class="Shell_Code_Input"><code class="Shell_Code_Prompt">ada@turing42~/<span - class="Shell_Code_Input"><code class="Shell_Code_Prompt">ada@turing42~/<span + style="color: white;"> </span></code>mkdir ITCS_<span class="DataField" data-course-number=""></span> </code> <br> + <code class="Shell_Code_Input"></code><code class="Shell_Code_Input"><code class="Shell_Code_Prompt">ada@turing42~/<span style="color: white;"> + </span></code>cd ITCS_<span class="DataField" data-course-number=""></span> </code> <br> + <code class="Shell_Code_Input"></code><code class="Shell_Code_Input"><code class="Shell_Code_Prompt">ada@turing42~/ITCS_<span class="DataField" - style="color: white;"> </span></code>mkdir - ITCS_<span class="DataField" data-course-number=""></span> - </code> <br> - <code class="Shell_Code_Input"></code><code class="Shell_Code_Input"><code - - class="Shell_Code_Prompt">ada@turing42~/<span style="color: white;"> - </span></code>cd ITCS_<span class="DataField" data-course-number=""></span> - </code> <br> - <code class="Shell_Code_Input"></code><code class="Shell_Code_Input"><code - - class="Shell_Code_Prompt">ada@turing42~/ITCS_<span - - class="DataField" data-course-number=""></span><span - - style="color: whdite;"> </span></code></code> <br> + data-course-number=""></span><span style="color: whdite;"> </span></code></code> <br> </div> </td> </tr> </tbody> </table> </li> - <li class="Instruction_Todo" data-point-fraction="10"><u>Exercise</u><strong>: - </strong>Create a sub-directory for this tutorial called - 'git-tutorial' and cd into that directory. Do all the - exercises in the ProGit book inside that directory. <br> + <li class="Instruction_Todo" data-point-fraction="10"><u>Exercise</u><strong>: </strong>Create a sub-directory for this tutorial called + 'git-tutorial' and cd into that directory. Do all the exercises in the ProGit book inside that directory. <br> <table class="Code_Example"> <tbody style="height: 75px;"> <tr> - <td> <button onclick="Code_Example_Toggle('Code_Example_0_3ai');">▽</button> - </td> + <td> <button onclick="Code_Example_Toggle('Code_Example_0_3ai');">▽</button> </td> <td> - <div style="height: 75px;"> <code class="Shell_Code_Input"><code - - class="Shell_Code_Prompt">ada@turing42~/ITCS_<span + <div style="height: 75px;"> <code class="Shell_Code_Input"><code class="Shell_Code_Prompt">ada@turing42~/ITCS_<span class="DataField" data-course-number=""></span><span - class="DataField" data-course-number=""></span><span + style="color: white;"> </span></code>mkdir git-tutorial<em></em> </code> <br> + <code class="Shell_Code_Input"><code class="Shell_Code_Prompt">ada@turing42~/<span style="color: white;"></span></code></code><code class="Shell_Code_Input"><code - style="color: white;"> </span></code>mkdir - git-tutorial<em></em> </code> <br> - <code class="Shell_Code_Input"><code class="Shell_Code_Prompt">ada@turing42~/<span + class="Shell_Code_Prompt"><span style="color: white;"><code class="Shell_Code_Input"><code class="Shell_Code_Prompt">ITCS_<span class="DataField" - style="color: white;"></span></code></code><code - - class="Shell_Code_Input"><code class="Shell_Code_Prompt"><span - - style="color: white;"><code class="Shell_Code_Input"><code - - class="Shell_Code_Prompt">ITCS_<span class="DataField" - - data-course-number=""></span></code></code> - </span></code>cd </code><code class="Shell_Code_Input"><code - - class="Shell_Code_Input">git-tutorial</code><em></em> + data-course-number=""></span></code></code> </span></code>cd </code><code class="Shell_Code_Input"><code class="Shell_Code_Input">git-tutorial</code><em></em> </code> <br> - <code class="Shell_Code_Input"><code class="Shell_Code_Prompt">ada@turing42~/ITCS_<span - - class="DataField" data-course-number=""></span>/git-tutorial</code></code> + <code class="Shell_Code_Input"><code class="Shell_Code_Prompt">ada@turing42~/ITCS_<span class="DataField" data-course-number=""></span>/git-tutorial</code></code> <br> </div> </td> @@ -760,29 +553,16 @@ <li data-point-fraction="20"><strong> ProGit - Chapter 1</strong>: <ol> <li class="Instruction_Read">Read ProGit sections 1.1 – 1.4</li> - <li class="Instruction_NonRubric"> Skip ProGit 1.5 (this was - covered in this tutorial’s <a href="#Installing_Git">Installing_Git</a>). - </li> - <li> Read ProGit 1.6. Also for the chapter subsections - named below, perform the steps described in that name - subsection using git.<br> + <li class="Instruction_NonRubric"> Skip ProGit 1.5 (this was covered in this tutorial’s <a href="#Installing_Git">Installing_Git</a>). </li> + <li> Read ProGit 1.6. Also for the chapter subsections named below, perform the steps described in that name subsection using git.<br> <ol> - <li class="Instruction_Todo"><u>Exercise</u><b>: </b>PG:“<a - - class="WindowOpenLeft" onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup#_your_identity','ProGit');">Your + <li class="Instruction_Todo"><u>Exercise</u><b>: </b>PG:“<a class="WindowOpenLeft" onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup#_your_identity','ProGit');">Your Identity </a>” - perform all described steps </li> - <li class="Instruction_Todo"><u>Exercise</u><strong>: - </strong>PG:<strong></strong>“ <a class="WindowOpenLeft" - - onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup#_editor','ProGit');" + <li class="Instruction_Todo"><u>Exercise</u><strong>: </strong>PG:<strong></strong>“ <a class="WindowOpenLeft" onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup#_editor','ProGit');" - target="_blank">Your Editor </a>” - perform all - described steps<br> - <em>Note</em>: use whatever simple editor you prefer - (notepad.exe perhaps) </li> - <li class="Instruction_Todo"><u>Exercise</u>: PG:“<a - - class="WindowOpenLeft" onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup#_checking_your_settings','ProGit');">Checking + target="_blank">Your Editor </a>” - perform all described steps<br> + <em>Note</em>: use whatever simple editor you prefer (notepad.exe perhaps) </li> + <li class="Instruction_Todo"><u>Exercise</u>: PG:“<a class="WindowOpenLeft" onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup#_checking_your_settings','ProGit');">Checking Your Settings </a>” - perform all described steps </li> </ol> </li> @@ -793,45 +573,27 @@ <li> Read <a class="WindowOpenLeft" onclick="windowOpenLeft('https://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository','ProGit');">ProGit 2.1:</a> <ol> - <li class="Instruction_Todo"><u>Exercise</u>: - Sub-section "<strong>Initializing a Repository in an - Existing Directory" </strong>assumes you have created - a set of files in a directory called - 'my-project'. To create and get these files, - in your browser click the following link to download - these files: <a href="./tutorial_example_files/my-project.tar.gz"><span - - class="File_Name">my-project.tar.gz</span> </a>. - After downloading, copy the file to your git-tutorial - directory. Then uncompress the tar.gz file as - follows:<br> + <li class="Instruction_Todo"><u>Exercise</u>: Sub-section "<strong>Initializing a Repository in an Existing Directory" </strong>assumes + you have created a set of files in a directory called 'my-project'. To create and get these files, in your browser click the + following link to download these files: <a href="./tutorial_example_files/my-project.tar.gz"><span class="File_Name">my-project.tar.gz</span> + </a>. After downloading, copy the file to your git-tutorial directory. Then uncompress the tar.gz file as follows:<br> <table class="Code_Example"> <tbody style="height: 250px;"> <tr> - <td> <button onclick="Code_Example_Toggle('Code_Example_0_3ai');">▽</button> - </td> + <td> <button onclick="Code_Example_Toggle('Code_Example_0_3ai');">▽</button> </td> <td> - <div style="height: 250px;"><code class="Shell_Code_Input"></code><code - - class="Shell_Code_Input"><code class="Shell_Code_Prompt">ada@turing42 - ~/ITCS_<span class="DataField" data-course-number=""></span>/git-tutorial</code> - tar -xf my-project.tar.gz </code> <br> - <code class="Shell_Code_Input"><code class="Shell_Code_Input"></code><code - - class="Shell_Code_Input"><code class="Shell_Code_Prompt">ada@turing42 - ~/ITCS_<span class="DataField" data-course-number=""></span>/git-tutorial</code></code> - ls -R </code> <br> + <div style="height: 250px;"><code class="Shell_Code_Input"></code><code class="Shell_Code_Input"><code class="Shell_Code_Prompt">ada@turing42 + ~/ITCS_<span class="DataField" data-course-number=""></span>/git-tutorial</code> tar -xf my-project.tar.gz </code> <br> + <code class="Shell_Code_Input"><code class="Shell_Code_Input"></code><code class="Shell_Code_Input"><code class="Shell_Code_Prompt">ada@turing42 + ~/ITCS_<span class="DataField" data-course-number=""></span>/git-tutorial</code></code> ls -R </code> <br> <code class="Shell_Code_Output"> .: <br> my-project my-project.tar.gz <br> <br> ./my-project:<br> main.c LICENSE <br> </code> <br> - <code class="Shell_Code_Input"><code class="Shell_Code_Input"></code><code - - class="Shell_Code_Input"><code class="Shell_Code_Prompt">ada@turing42 - ~/ITCS_<span class="DataField" data-course-number=""></span>/git-tutorial</code></code> - cd my-project </code> </div> + <code class="Shell_Code_Input"><code class="Shell_Code_Input"></code><code class="Shell_Code_Input"><code class="Shell_Code_Prompt">ada@turing42 + ~/ITCS_<span class="DataField" data-course-number=""></span>/git-tutorial</code></code> cd my-project </code> </div> </td> </tr> </tbody> @@ -840,69 +602,45 @@ </li> <li class="Instruction_Todo"><u>Exercise</u>: PG: <a href="https://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository#_initializing_a_repository_in_an_existing_directory" - target="_blank">Initializing a Repository in an - Existing Directory</a> <br> + target="_blank">Initializing a Repository in an Existing Directory</a> <br> <br> - Perform the instructions in the above section of the - book, inside the <span class="File_Name">my-project </span>directory - you just created.<br> + Perform the instructions in the above section of the book, inside the <span class="File_Name">my-project </span>directory you just + created.<br> <br> </li> - <li><u>Exercise</u>: <i> Push the pre-existing - local repo to a remote repo.</i> + <li><u>Exercise</u>: <i> Push the pre-existing local repo to a remote repo.</i> <ol> - <li class="Instruction_Todo">Create a remote - repository on the git server called <span class="File_Name">my-project</span>. - <br> Follow the instructions in Appendix II <a href="#How_to_Create_New_Remote_Repository">"How - to Create New Remote Repository" </a> </li> - <li class="Instruction_Todo">To connect your local - repo to the remote repo do as shown below, where <code - - class="Shell_Code_Input"></code><code class="Shell_Code_Input"><span + <li class="Instruction_Todo">Create a remote repository on the git server called <span class="File_Name">my-project</span>. + <br> Follow the instructions in Appendix II <a href="#How_to_Create_New_Remote_Repository">"How to Create New Remote + Repository" </a> </li> + <li class="Instruction_Todo">To connect your local repo to the remote repo do as shown below, where <code class="Shell_Code_Input"></code><code - class="Server_Name"><span class="User_Input">URL - of my-project</span></span></code> is the full - URL of the remote repo.<br> + class="Shell_Code_Input"><span class="Server_Name"><span class="User_Input">URL of my-project</span></span></code> is the full URL + of the remote repo.<br> <table class="Code_Example"> <tbody style="height: 150px;"> <tr> - <td> <button onclick="Code_Example_Toggle('Code_Example_0_3ai');">▽ - </button> </td> + <td> <button onclick="Code_Example_Toggle('Code_Example_0_3ai');">▽ </button> </td> <td> - <div style="height: 150px;"> <code class="Shell_Code_Input"> - <code class="Shell_Code_Prompt">ada@turing42 - ~/ITCS_<span class="DataField" data-course-number=""></span>/git-tutorial/my-project</code> - git remote add origin <span class="Server_Name"><span + <div style="height: 150px;"> <code class="Shell_Code_Input"> <code class="Shell_Code_Prompt">ada@turing42 ~/ITCS_<span class="DataField" - class="User_Input">URL of my-project</span></span><br> - </code> <code class="Shell_Code_Input"><code + data-course-number=""></span>/git-tutorial/my-project</code> git remote add origin <span class="Server_Name"><span - class="Shell_Code_Prompt">ada@turing42 - ~/ITCS_<span class="DataField" data-course-number=""></span>/git-tutorial</code></code><code + class="User_Input">URL of my-project</span></span><br> + </code> <code class="Shell_Code_Input"><code class="Shell_Code_Prompt">ada@turing42 ~/ITCS_<span class="DataField" data-course-number=""></span>/git-tutorial</code></code><code - class="Shell_Code_Input"><code class="Shell_Code_Input"><code + class="Shell_Code_Input"><code class="Shell_Code_Input"><code class="Shell_Code_Prompt">/my-project </code></code></code><code - class="Shell_Code_Prompt">/my-project - </code></code></code><code class="Shell_Code_Input">git - push origin main <span style="color: black;"> - <span style="font-family: serif;">t </span></span> + class="Shell_Code_Input">git push origin main <span style="color: black;"> <span style="font-family: serif;">t </span></span> </code> <br> - <code class="Shell_Code_Input"> <span class="Shell_Code_Comment">[ - the credential manager that you - install will now prompt you for your - user id and PAT]</span></code><code class="Shell_Code_Input"><br> - <span style="color: lightgreen;">Enumerating - objects: 3, done.<br> + <code class="Shell_Code_Input"> <span class="Shell_Code_Comment">[ the credential manager that you install will now + prompt you for your user id and PAT]</span></code><code class="Shell_Code_Input"><br> + <span style="color: lightgreen;">Enumerating objects: 3, done.<br> Counting objects: 100% (3/3), done.<br> - Writing objects: 100% (3/3), 211 bytes - | 211.00 KiB/s, done.<br> - Total 3 (delta 0), reused 0 (delta 0), - pack-reused 0<br> - To - https://cci-git.charlotte.edu/zwartell/my-project.git<br> - * [new - branch] - main -> main<br> + Writing objects: 100% (3/3), 211 bytes | 211.00 KiB/s, done.<br> + Total 3 (delta 0), reused 0 (delta 0), pack-reused 0<br> + To https://cci-git.charlotte.edu/zwartell/my-project.git<br> + * [new branch] main -> main<br> </span></code><code class="Shell_Code_Output"><br> </code> <br> <code class="Shell_Code_Input"><code> </code></code></div> @@ -913,97 +651,62 @@ </li> </ol> </li> - <li class="Instruction_Todo"><u>Exercise</u>: PG: “<a class="WindowOpenLeft" - - onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository#Cloning-an-Existing-Repository','ProGit');">Cloning + <li class="Instruction_Todo"><u>Exercise</u>: PG: “<a class="WindowOpenLeft" onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository#Cloning-an-Existing-Repository','ProGit');">Cloning an Existing Repository </a>”<br> - Return to your <span class="File_Name">git-tutorial</span><strong> - </strong>directory: <br> + Return to your <span class="File_Name">git-tutorial</span><strong> </strong>directory: <br> <br> - Perform the book’s exercises. This will create - various clones of a remote repo mentioned in the book in - your <span class="File_Name">git-tutorial</span> + Perform the book’s exercises. This will create various clones of a remote repo mentioned in the book in your <span class="File_Name">git-tutorial</span> directory. </li> </ol> </li> <li> Read ProGit 2.2: <ol> - <li class="Instruction_Todo">Download the required - practice files, 'ProGit_Chapter_2_2.tar.gz'. <br> - In your browser click the following link: <a - - href="./tutorial_example_files/ProGit_Chapter_2_2.tar.gz"><span - - class="File_Name">ProGit_Chapter_2_2.tar.gz</span></a>. - After downloading, copy the file to your git-tutorial - directory. Then uncompress the tar.gz file as - follows:<br> + <li class="Instruction_Todo">Download the required practice files, 'ProGit_Chapter_2_2.tar.gz'. <br> + In your browser click the following link: <a href="./tutorial_example_files/ProGit_Chapter_2_2.tar.gz"><span class="File_Name">ProGit_Chapter_2_2.tar.gz</span></a>. + After downloading, copy the file to your git-tutorial directory. Then uncompress the tar.gz file as follows:<br> <table class="Code_Example" id="Code_Example_0_3bi"> <tbody style="height: 110px;"> <tr> - <td> <button onclick="Code_Example_Toggle('Code_Example_0_3bi');">▽</button> - </td> + <td> <button onclick="Code_Example_Toggle('Code_Example_0_3bi');">▽</button> </td> <td> - <div> <code class="Shell_Code_Prompt">ada@turing42 - ~/ITCS_<span class="DataField" data-course-number=""></span>/git-tutorial</code> - <code class="Shell_Code_Input">tar -xf - ProGit_Chapter_2_2.tar.gz </code> <br> - <code class="Shell_Code_Prompt">ada@turing42 - ~/ITCS_<span class="DataField" data-course-number=""></span>/git-tutorial</code> - <code class="Shell_Code_Input"> cd - ProGit_Chapter_2_2</code> </div> - <code class="Shell_Code_Input"><code class="Shell_Code_Input"> - </code></code> </td> + <div> <code class="Shell_Code_Prompt">ada@turing42 ~/ITCS_<span class="DataField" data-course-number=""></span>/git-tutorial</code> + <code class="Shell_Code_Input">tar -xf ProGit_Chapter_2_2.tar.gz </code> <br> + <code class="Shell_Code_Prompt">ada@turing42 ~/ITCS_<span class="DataField" data-course-number=""></span>/git-tutorial</code> + <code class="Shell_Code_Input"> cd ProGit_Chapter_2_2</code> </div> + <code class="Shell_Code_Input"><code class="Shell_Code_Input"> </code></code> </td> </tr> </tbody> </table> <br> Perform the exercises below in the above directory. <br> </li> - <li class="Instruction_Todo"><u>Exercise</u>: PG: “<a class="WindowOpenLeft" - - onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_checking_status','ProGit');">Checking + <li class="Instruction_Todo"><u>Exercise</u>: PG: “<a class="WindowOpenLeft" onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_checking_status','ProGit');">Checking the Status of Your Files </a>” - perform all steps<br> <br> - <em>Note</em>: Use whatever text file editor you are - familiar with instead of vim for the “$vim README“ and - similar examples in this ProGit chapter.<br> + <em>Note</em>: Use whatever text file editor you are familiar with instead of vim for the “$vim README“ and similar examples in this + ProGit chapter.<br> <br> </li> - <li class="Instruction_Todo"><u>Exercise</u>: PG:<a class="WindowOpenLeft" - - onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_tracking_files','ProGit');"> + <li class="Instruction_Todo"><u>Exercise</u>: PG:<a class="WindowOpenLeft" onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_tracking_files','ProGit');"> Tracking New Files </a> - perform all steps </li> - <li><u>Exercise</u>: Push the pre-existing local - repo to a remote repo: + <li><u>Exercise</u>: Push the pre-existing local repo to a remote repo: <ol> - <li class="Instruction_Todo">Create a remote - repository on the git server called <span class="File_Name">progit-chapter-2-2</span>. - Follow the instructions in Appendix II <a href="#How_to_Create_New_Remote_Repository">"How - to Create New Remote Repository" </a> </li> - <li class="Instruction_Todo">To connect your local - repo to the remote repo do as shown below, where <code - - class="Shell_Code_Input"></code> <code class="Shell_Code_Input"></code> - is the full URL of the remote repo.<br> + <li class="Instruction_Todo">Create a remote repository on the git server called <span class="File_Name">progit-chapter-2-2</span>. + Follow the instructions in Appendix II <a href="#How_to_Create_New_Remote_Repository">"How to Create New Remote Repository" </a> + </li> + <li class="Instruction_Todo">To connect your local repo to the remote repo do as shown below, where <code class="Shell_Code_Input"></code> + <code class="Shell_Code_Input"></code> is the full URL of the remote repo.<br> <table class="Code_Example"> <tbody> <tr> <td> <button>▽</button> </td> <td> - <div> <code class="Shell_Code_Prompt">ada@turing42 - ~/ITCS_<span class="DataField" data-course-number=""></span>/git-tutorial/ProGit_Chapter_2_2</code> - <code class="Shell_Code_Input"> git remote - add origin <span class="User_Input">URL - of my-project</span></code><br> - <code class="Shell_Code_Prompt">ada@turing42 - ~/ITCS_<span class="DataField" data-course-number=""></span>/git-tutorial/ProGit_Chapter_2_2</code> - <code class="Shell_Code_Input">git push - origin main </code> <br> - <code class="Shell_Code_Input"> <span class="Shell_Code_Comment">[ - the credential manager that you - install will now prompt you for your - username and PAT] </span> </code> </div> + <div> <code class="Shell_Code_Prompt">ada@turing42 ~/ITCS_<span class="DataField" data-course-number=""></span>/git-tutorial/ProGit_Chapter_2_2</code> + <code class="Shell_Code_Input"> git remote add origin <span class="User_Input">URL of my-project</span></code><br> + <code class="Shell_Code_Prompt">ada@turing42 ~/ITCS_<span class="DataField" data-course-number=""></span>/git-tutorial/ProGit_Chapter_2_2</code> + <code class="Shell_Code_Input">git push origin main </code> <br> + <code class="Shell_Code_Input"> <span class="Shell_Code_Comment">[ the credential manager that you install will now + prompt you for your username and PAT] </span> </code> </div> </td> </tr> </tbody> @@ -1011,62 +714,37 @@ </li> </ol> </li> - <li class="Instruction_Todo"><u>Exercise</u>: PG:<a class="WindowOpenLeft" - - onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#Tracking-New-Files','ProGit');"> + <li class="Instruction_Todo"><u>Exercise</u>: PG:<a class="WindowOpenLeft" onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#Tracking-New-Files','ProGit');"> </a> <a class="WindowOpenLeft" onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_staging_modified_files','ProGit');"> Staging Modified Files </a> - perform all steps<br> <br> - <em>Note:</em> When the book discusses making - changes to various files, just make any small change to - each file.<br> + <em>Note:</em> When the book discusses making changes to various files, just make any small change to each file.<br> </li> - <li class="Instruction_Todo"><u>Exercise</u>: PG: <a class="WindowOpenLeft" - - onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_short_status','ProGit');"> + <li class="Instruction_Todo"><u>Exercise</u>: PG: <a class="WindowOpenLeft" onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_short_status','ProGit');"> Short Status </a> - perform all steps </li> - <li class="Instruction_Todo"><u>Exercise</u>: PG: <a class="WindowOpenLeft" - - onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_ignoring','ProGit');"> + <li class="Instruction_Todo"><u>Exercise</u>: PG: <a class="WindowOpenLeft" onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_ignoring','ProGit');"> Ignoring Files </a> - perform all steps </li> - <li class="Instruction_Todo"><u>Exercise</u>: PG: <a class="WindowOpenLeft" - - onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_git_diff_staged','ProGit');"> - Viewing Your Staged and Unstaged Changes </a> - - perform all steps<br> + <li class="Instruction_Todo"><u>Exercise</u>: PG: <a class="WindowOpenLeft" onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_git_diff_staged','ProGit');"> + Viewing Your Staged and Unstaged Changes </a> - perform all steps<br> <em> <br> - Note: </em> When the book discusses making - changes to various files, just make any small change to - each file.<br> + Note: </em> When the book discusses making changes to various files, just make any small change to each file.<br> </li> - <li class="Instruction_Todo"><u>Exercise</u>: PG:<a class="WindowOpenLeft" - - onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_committing_changes','ProGit');"> + <li class="Instruction_Todo"><u>Exercise</u>: PG:<a class="WindowOpenLeft" onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_committing_changes','ProGit');"> Committing Your Change </a> - perform all steps </li> - <li class="Instruction_Todo"><u>Exercise</u>: PG:<a class="WindowOpenLeft" - - onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_skipping_the_staging_area','ProGit');"> + <li class="Instruction_Todo"><u>Exercise</u>: PG:<a class="WindowOpenLeft" onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_skipping_the_staging_area','ProGit');"> Skipping the Staging Area </a> - perform all steps </li> - <li class="Instruction_Todo"><u>Exercise</u>: PG:<a class="WindowOpenLeft" - - onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_removing_files','ProGit');"> + <li class="Instruction_Todo"><u>Exercise</u>: PG:<a class="WindowOpenLeft" onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_removing_files','ProGit');"> Removing Files </a> - perform all steps </li> - <li class="Instruction_Todo"><u>Exercise</u>: PG:<a class="WindowOpenLeft" - - onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_git_mv','ProGit');"> + <li class="Instruction_Todo"><u>Exercise</u>: PG:<a class="WindowOpenLeft" onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_git_mv','ProGit');"> Moving Files </a> - perform all steps </li> - <li class="Instruction_Todo"><u>Exercise</u>: Push - the updates to remote remote repo: + <li class="Instruction_Todo"><u>Exercise</u>: Push the updates to remote remote repo: <table class="Code_Example"> <tbody style="height: 50px;"> <tr> - <td> <button onclick="Code_Example_Toggle('Code_Example_0_3ai');">▽ - </button> </td> + <td> <button onclick="Code_Example_Toggle('Code_Example_0_3ai');">▽ </button> </td> <td> - <div style="height: 50px;"> <code class="Shell_Code_Prompt">ada@turing42 - ~/ITCS_<span class="DataField" data-course-number=""></span>/git-tutorial/ProGit_Chapter_2_2</code> - <code class="Shell_Code_Input">git push origin - main </code> </div> + <div style="height: 50px;"> <code class="Shell_Code_Prompt">ada@turing42 ~/ITCS_<span class="DataField" data-course-number=""></span>/git-tutorial/ProGit_Chapter_2_2</code> + <code class="Shell_Code_Input">git push origin main </code> </div> </td> </tr> </tbody> @@ -1076,65 +754,37 @@ </li> <li> Read ProGit 2.3 <ol> - <li class="Instruction_Todo"><u>Exercise</u>: PG: <a class="WindowOpenLeft" - - onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History','ProGit');"> + <li class="Instruction_Todo"><u>Exercise</u>: PG: <a class="WindowOpenLeft" onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History','ProGit');"> Viewing the Commit History </a><br> <br> - Do the first two exercises, cloning simplegit-progit - into: <br> + Do the first two exercises, cloning simplegit-progit into: <br> <div align="center"><span class="File_Name">git-tutorial\simplegit-progit</span></div> - <u>Stop</u> at the chapter's instruction “$ git log -p - -2“. </li> + <u>Stop</u> at the chapter's instruction “$ git log -p -2“. </li> <li> <u>Exercise:</u> Forking simplegit-progit<br> - <i>Forking</i> is a more advanced concept used to - contribute to a project developed by someone else. - Forking is used when the original developer has made the - project available on a remote repo from which you may - git clone, but to which you do <u>not</u> have - permission to push. In many fork workflows, your forked - copy would reside on the same git server hosting the - developer's remote repo. However, in this exercise you - will use an alternate fork workflow where your forked - copy resides on the git server used in this course while - the developer's repo resides on GitHub. To fork - simplegit-progit do as follows: + <i>Forking</i> is a more advanced concept used to contribute to a project developed by someone else. Forking is used when the original + developer has made the project available on a remote repo from which you may git clone, but to which you do <u>not</u> have permission + to push. In many fork workflows, your forked copy would reside on the same git server hosting the developer's remote repo. However, in + this exercise you will use an alternate fork workflow where your forked copy resides on the git server used in this course while the + developer's repo resides on GitHub. To fork simplegit-progit do as follows: <ol> - <li class="Instruction_Todo">Create a remote - repository on this course's git server called <span - - class="File_Name">simplegit-progit</span>. Follow - the instructions in Appendix II <a href="#How_to_Create_New_Remote_Repository">"How - to Create New Remote Repository" </a> </li> + <li class="Instruction_Todo">Create a remote repository on this course's git server called <span class="File_Name">simplegit-progit</span>. + Follow the instructions in Appendix II <a href="#How_to_Create_New_Remote_Repository">"How to Create New Remote Repository" </a> + </li> <li class="Instruction_Todo">Next do as follows: <table class="Code_Example"> <tbody style="height: 150px;"> <tr> - <td> <button onclick="Code_Example_Toggle('Code_Example_0_3ai');">▽ - </button> </td> + <td> <button onclick="Code_Example_Toggle('Code_Example_0_3ai');">▽ </button> </td> <td> - <div> <code class="Shell_Code_Prompt">ada@turing42 - ~/ITCS_<span class="DataField" data-course-number=""></span>/git-tutorial/simplegit-progit</code> - <code class="Shell_Code_Input">git remote - rename origin upstream </code><br> - <span class="Shell_Code_Comment"> [This - renames the source repo to 'upstream', a - common convention] </span><br> - <code class="Shell_Code_Prompt">ada@turing42 - ~/ITCS_<span class="DataField" data-course-number=""></span>/git-tutorial/simplegit-progit</code> - <code class="Shell_Code_Input">git remote - add origin <span class="User_Input">URL - of your repo created above </span> </code><br> - <span class="Shell_Code_Comment"> [This - associates the origin ref with your - remote repo] </span><br> - <code class="Shell_Code_Prompt">ada@turing42 - ~/ITCS_<span class="DataField" data-course-number=""></span>/git-tutorial/simplegit-progit</code> - <code class="Shell_Code_Input">git push - origin --all </code><br> - <span class="Shell_Code_Comment"> [This - pushes all tags to your remote repo] </span> - </div> + <div> <code class="Shell_Code_Prompt">ada@turing42 ~/ITCS_<span class="DataField" data-course-number=""></span>/git-tutorial/simplegit-progit</code> + <code class="Shell_Code_Input">git remote rename origin upstream </code><br> + <span class="Shell_Code_Comment"> [This renames the source repo to 'upstream', a common convention] </span><br> + <code class="Shell_Code_Prompt">ada@turing42 ~/ITCS_<span class="DataField" data-course-number=""></span>/git-tutorial/simplegit-progit</code> + <code class="Shell_Code_Input">git remote add origin <span class="User_Input">URL of your repo created above </span> </code><br> + <span class="Shell_Code_Comment"> [This associates the origin ref with your remote repo] </span><br> + <code class="Shell_Code_Prompt">ada@turing42 ~/ITCS_<span class="DataField" data-course-number=""></span>/git-tutorial/simplegit-progit</code> + <code class="Shell_Code_Input">git push origin --all </code><br> + <span class="Shell_Code_Comment"> [This pushes all tags to your remote repo] </span> </div> </td> </tr> </tbody> @@ -1146,105 +796,59 @@ </li> </ol> </li> - <li data-point-fraction="5" class="Instruction_Todo"> <u> - Exercise:</u> Verify all your remote repositories on the - course's git server following the instructions in Section <a href="#Verify_Your_Remote_Repository"> - Verify Your Remote Repository </a>. </li> + <li data-point-fraction="5" class="Instruction_Todo"> <u> Exercise:</u> Verify all your remote repositories on the course's git server following + the instructions in Section <a href="#Verify_Your_Remote_Repository"> Verify Your Remote Repository </a>. </li> </ol> <p><strong>This completes the Full Git Tutorial.</strong></p> </section> - <section class="Instruction_Section" data-optionset="{"name":"Part 4"}" - - data-point-fraction="10"><span id="Part4_OptionII"></span> - <h1 class="Section" id="Micro_Git_Tutorial">Part 4: Option II: Micro - Git Tutorial</h1> - <p> The micro tutorial is a quick verification that you have full - read/write access to your remote repository on the course's Git - server. + <section class="Instruction_Section" data-optionset="{"name":"Part 4"}" data-point-fraction="10"><span id="Part4_OptionII"></span> + <h1 class="Section" id="Micro_Git_Tutorial">Part 4: Option II: Micro Git Tutorial</h1> + <p> The micro tutorial is a quick verification that you have full read/write access to your remote repository on the course's Git server. <!-- For most courses, students must ask the professor via email for permission to perform this micro tutorial and to skip the full git tutorial. (At the professor's discretion, in certain advanced courses, all students will be directly instructed to just perform the Micro Git Tutorial). --> </p> <ol class="Instruction"> - <li class="Instruction_Todo"><u>Exercise</u><strong>: </strong>This - tutorial and all later projects in the course, assume you have - created a 'course' directory that will contain further - sub-directories, one subdirectory per tutorial or - project. You should create the course directory - now. Name the course directory using your course - number, such as "ITCS_<span class="DataField" data-course-number=""></span>". - In this and later assignments the bash code examples will use - the name ITCS_<span class="DataField" data-course-number=""></span> - in order keep the instruction text generic. If your course - number differs, you should substitute your course number after - the <em>ITCS_.</em><br> + <li class="Instruction_Todo"><u>Exercise</u><strong>: </strong>This tutorial and all later projects in the course, assume you have created + a 'course' directory that will contain further sub-directories, one subdirectory per tutorial or project. You should create the + course directory now. Name the course directory using your course number, such as "ITCS_<span class="DataField" data-course-number=""></span>". + In this and later assignments the bash code examples will use the name ITCS_<span class="DataField" data-course-number=""></span> in order keep + the instruction text generic. If your course number differs, you should substitute your course number after the <em>ITCS_.</em><br> <table class="Code_Example"> <tbody style="height: 75px;"> <tr> - <td> <button onclick="Code_Example_Toggle('Code_Example_0_3ai');">▽</button> - </td> + <td> <button onclick="Code_Example_Toggle('Code_Example_0_3ai');">▽</button> </td> <td> - <div style="height: 75px;"> <code class="Shell_Code_Input"></code><code - - class="Shell_Code_Input"><code class="Shell_Code_Prompt">ada@turing42~/<span - - style="color: white;"> </span></code>mkdir - ITCS_<span class="DataField" data-course-number=""></span> - </code> <br> - <code class="Shell_Code_Input"></code><code class="Shell_Code_Input"><code - - class="Shell_Code_Prompt">ada@turing42~/<span style="color: white;"> - </span></code>cd ITCS_<span class="DataField" data-course-number=""></span> - </code> <br> - <code class="Shell_Code_Input"></code><code class="Shell_Code_Input"><code + <div style="height: 75px;"> <code class="Shell_Code_Input"></code><code class="Shell_Code_Input"><code class="Shell_Code_Prompt">ada@turing42~/<span - class="Shell_Code_Prompt">ada@turing42~/ITCS_<span + style="color: white;"> </span></code>mkdir ITCS_<span class="DataField" data-course-number=""></span> </code> <br> + <code class="Shell_Code_Input"></code><code class="Shell_Code_Input"><code class="Shell_Code_Prompt">ada@turing42~/<span style="color: white;"> + </span></code>cd ITCS_<span class="DataField" data-course-number=""></span> </code> <br> + <code class="Shell_Code_Input"></code><code class="Shell_Code_Input"><code class="Shell_Code_Prompt">ada@turing42~/ITCS_<span class="DataField" - class="DataField" data-course-number=""></span><span - - style="color: white;"> </span></code></code> <br> + data-course-number=""></span><span style="color: white;"> </span></code></code> <br> </div> </td> </tr> </tbody> </table> </li> - <li class="Instruction_Todo"><u>Exercise</u><strong>: </strong> - Create a sub-directory for this tutorial called - 'git-micro-tutorial' and cd into that directory. Do all - the exercises in the ProGit book inside that directory. <br> + <li class="Instruction_Todo"><u>Exercise</u><strong>: </strong> Create a sub-directory for this tutorial called 'git-micro-tutorial' and cd + into that directory. Do all the exercises in the ProGit book inside that directory. <br> <table class="Code_Example"> <tbody style="height: 75px;"> <tr> - <td> <button onclick="Code_Example_Toggle('Code_Example_0_3ai');">▽</button> - </td> + <td> <button onclick="Code_Example_Toggle('Code_Example_0_3ai');">▽</button> </td> <td> - <div style="height: 75px;"> <code class="Shell_Code_Input"><code - - class="Shell_Code_Prompt">ada@turing42~/ITCS_<span - - class="DataField" data-course-number=""></span><span - - style="color: white;"> </span></code>mkdir - git-micro-tutorial<em></em> </code> <br> - <code class="Shell_Code_Input"><code class="Shell_Code_Prompt">ada@turing42~/<span - - style="color: white;"></span></code></code><code + <div style="height: 75px;"> <code class="Shell_Code_Input"><code class="Shell_Code_Prompt">ada@turing42~/ITCS_<span class="DataField" data-course-number=""></span><span - class="Shell_Code_Input"><code class="Shell_Code_Prompt"><span + style="color: white;"> </span></code>mkdir git-micro-tutorial<em></em> </code> <br> + <code class="Shell_Code_Input"><code class="Shell_Code_Prompt">ada@turing42~/<span style="color: white;"></span></code></code><code class="Shell_Code_Input"><code - style="color: white;"><code class="Shell_Code_Input"><code + class="Shell_Code_Prompt"><span style="color: white;"><code class="Shell_Code_Input"><code class="Shell_Code_Prompt">ITCS_<span class="DataField" - class="Shell_Code_Prompt">ITCS_<span class="DataField" - - data-course-number=""></span></code></code> - </span></code>cd </code><code class="Shell_Code_Input"><code - - class="Shell_Code_Input">git-micro-tutorial</code><em></em> + data-course-number=""></span></code></code> </span></code>cd </code><code class="Shell_Code_Input"><code class="Shell_Code_Input">git-micro-tutorial</code><em></em> </code> <br> - <code class="Shell_Code_Prompt">ada@turing42~/ITCS_<span - - class="DataField" data-course-number=""></span>/git-micro-tutorial</code> - <br> + <code class="Shell_Code_Prompt">ada@turing42~/ITCS_<span class="DataField" data-course-number=""></span>/git-micro-tutorial</code> <br> </div> </td> </tr> @@ -1252,72 +856,49 @@ </table> </li> <li><u>Exercise</u><strong>: </strong>Shell / Git Setup<strong><br> - </strong>The first time git is used in bash (or in another - equivalent shell)<strong>, </strong>you<strong> </strong>need - to perform some git configuration steps<strong>. </strong>If - you<strong> </strong>installed bash<strong> </strong>for the - first time<strong> </strong>on your computer, or if you are - using git for the first time within another shell that you - chose, then you need to perform the following:<br> + </strong>The first time git is used in bash (or in another equivalent shell)<strong>, </strong>you<strong> </strong>need to perform some git + configuration steps<strong>. </strong>If you<strong> </strong>installed bash<strong> </strong>for the first time<strong> </strong>on + your computer, or if you are using git for the first time within another shell that you chose, then you need to perform the following:<br> <ol> - <li>Read ProGit 1.6. This chapter subsection and do the - subsection's described exercises in the shell:<u><br> + <li>Read ProGit 1.6. This chapter subsection and do the subsection's described exercises in the shell:<u><br> </u> <ol> - <li class="Instruction_Todo"><u>Exercise</u><b>: </b>PG:“<a - - class="WindowOpenLeft" onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup#_your_identity','ProGit');">Your + <li class="Instruction_Todo"><u>Exercise</u><b>: </b>PG:“<a class="WindowOpenLeft" onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup#_your_identity','ProGit');">Your Identity </a>” - perform all steps</li> - <li class="Instruction_Todo"><u>Exercise</u><strong>: - </strong>PG:<strong></strong>“ <a class="WindowOpenLeft" - - onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup#_editor','ProGit');">Your + <li class="Instruction_Todo"><u>Exercise</u><strong>: </strong>PG:<strong></strong>“ <a class="WindowOpenLeft" onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup#_editor','ProGit');">Your Editor </a>” - perform all steps<em><br> - Note</em>: use whatever simple editor you prefer - (notepad.exe perhaps)</li> - <li class="Instruction_Todo"><u>Exercise</u>: PG:“<a - - class="WindowOpenLeft" onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup#_checking_your_settings','ProGit');">Checking + Note</em>: use whatever simple editor you prefer (notepad.exe perhaps)</li> + <li class="Instruction_Todo"><u>Exercise</u>: PG:“<a class="WindowOpenLeft" onclick="windowOpenLeft('http://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup#_checking_your_settings','ProGit');">Checking Your Settings </a>” - perform all steps </li> </ol> </li> </ol> <strong><br> </strong></li> - <li class="Instruction_Todo"><u>Exercise</u><strong>: </strong>Create - and Setup Git Server Access.<br> - Create and setup your account on the Git server used in your - class and setup the recommended git client access method as - described in the Appendix I <a href="#Git_Server_Access">Git_Server_Access</a>, - Then use the shell you opened when following that section’s + <li class="Instruction_Todo"><u>Exercise</u><strong>: </strong>Create and Setup Git Server Access.<br> + Create and setup your account on the Git server used in your class and setup the recommended git client access method as described in the + Appendix I <a href="#Git_Server_Access">Git_Server_Access</a>, Then use the shell you opened when following that section’s instructions to perform the next steps.</li> - <li class="Instruction_Composite"> Create a new <u>remote</u> - repo: + <li class="Instruction_Composite"> Create a new <u>remote</u> repo: <ol class="Instruction_Option Instruction_Todo"> <li> [<em>YourServer</em>=<strong>cci-git</strong>] - <div class="Server_Cci_Git"> Create new remote repo on - cci-git called,<span class="File_Name"> git-micro-tutorial</span>. - using the procedures of Appendix I-3 <a href="#Git_Server_Access">Git_Server_Access</a>.<br> + <div class="Server_Cci_Git"> Create new remote repo on cci-git called,<span class="File_Name"> git-micro-tutorial</span>. using the + procedures of Appendix I-3 <a href="#Git_Server_Access">Git_Server_Access</a>.<br> <br> - Do not forget to to <strong><u>share</u></strong> your - repo with the TA and Professor (as discussed in the - Appendix section <a href="#Basic_Git_Operations">Basic + Do not forget to to <strong><u>share</u></strong> your repo with the TA and Professor (as discussed in the Appendix section <a href="#Basic_Git_Operations">Basic Git Operations).</a></div> </li> <!-- <li> [<em>YourServer</em>=<strong>Bitbucket</strong>] <div class="Server_Bitbucket"> <br> Create new remote repo on Bitbucket called,<span class="File_Name"> git-micro-tutorial </span> . This is best done using the Web Browser interface to the server. Review <a href="#Bitbucket_URL_List"> Bitbucket Server URL </a> and Section <a href="#Basic_Git_Operations"> Basic Git Operations </a> on repo creation. Make sure to <strong><u>share</u></strong> it with the TA and Dr. Wartell’s Bitbucket accounts. <br> <br> </div> </li> --> </ol> </li> - <li class="Instruction_Composite"> Create <u>local</u> repo and - link to the new <u>remote</u> repo:<br> + <li class="Instruction_Composite"> Create <u>local</u> repo and link to the new <u>remote</u> repo:<br> <br> - In the instructions below, for input <span class="User_Input">URL - of remote repo</span> use the URL as listed on the server (see - Appendix section <a href="#Basic_Git_Operations">Basic Git - Operations).</a> for details). + In the instructions below, for input <span class="User_Input">URL of remote repo</span> use the URL as listed on the server (see Appendix + section <a href="#Basic_Git_Operations">Basic Git Operations).</a> for details). <ol class="Instruction_Option Instruction_Todo"> - <li> [<em>YourServer</em>=<strong>cci-git</strong>] - <br> <br> + <li> [<em>YourServer</em>=<strong>cci-git</strong>] <br> + <br> </li> <!-- <li> [<em>YourServer</em>=<strong>bitbucket</strong>] git@bitbucket.org:<span class="User_Input">your_user_id</span> </li> --> @@ -1325,24 +906,15 @@ <table class="Code_Example" id="Code_Example_6_3"> <tbody style="height: 105px;"> <tr> - <td> <button onclick="Code_Example_Toggle('Code_Example_6_3');">▽</button> - </td> + <td> <button onclick="Code_Example_Toggle('Code_Example_6_3');">▽</button> </td> <td> - <div style="height: 105px;"> <code class="Shell_Code_Prompt">ada@turing42~/ITCS_<span - - class="DataField" data-course-number=""></span>/git-micro-tutorial</code> <code - - class="Shell_Code_Input"> git init</code> <code class="Shell_Code_Output"> - <br> - Initialized empty Git repository in - git-micro-tutorial/.git/ </code> <br> - <code class="Shell_Code_Prompt">ada@turing42~/ITCS_<span + <div style="height: 105px;"> <code class="Shell_Code_Prompt">ada@turing42~/ITCS_<span class="DataField" data-course-number=""></span>/git-micro-tutorial</code> <code - class="DataField" data-course-number=""></span>/git-micro-tutorial</code><code + class="Shell_Code_Input"> git init</code> <code class="Shell_Code_Output"> <br> + Initialized empty Git repository in git-micro-tutorial/.git/ </code> <br> + <code class="Shell_Code_Prompt">ada@turing42~/ITCS_<span class="DataField" data-course-number=""></span>/git-micro-tutorial</code><code - class="Shell_Code_Input"> git remote add - origin <span class="User_Input">URL of remote repo</span> - </code></div> + class="Shell_Code_Input"> git remote add origin <span class="User_Input">URL of remote repo</span> </code></div> </td> </tr> </tbody> @@ -1352,12 +924,9 @@ <table class="Code_Example" id="Code_Example_6_4"> <tbody style="height: 25px;"> <tr> - <td> <button onclick="Code_Example_Toggle('Code_Example_6_4');">▽</button> - </td> + <td> <button onclick="Code_Example_Toggle('Code_Example_6_4');">▽</button> </td> <td> - <div style="height: 25px;"> <code class="Shell_Code_Prompt">ada@turing42~/ITCS_<span - - class="DataField" data-course-number=""></span>/git-micro-tutorial</code> <code + <div style="height: 25px;"> <code class="Shell_Code_Prompt">ada@turing42~/ITCS_<span class="DataField" data-course-number=""></span>/git-micro-tutorial</code> <code class="Shell_Code_Input"> echo Hello > Test.txt <br> </code></div> @@ -1366,44 +935,29 @@ </tbody> </table> </li> - <li class="Instruction_Todo"> Add, commit and push to the Git - server remote repo. + <li class="Instruction_Todo"> Add, commit and push to the Git server remote repo. <table class="Code_Example" id="Code_Example_6_5"> <tbody> <tr> - <td> <button onclick="Code_Example_Toggle('Code_Example_6_5');">▽</button> - </td> + <td> <button onclick="Code_Example_Toggle('Code_Example_6_5');">▽</button> </td> <td> - <div> <code class="Shell_Code_Prompt">ada@turing42~/ITCS_<span - - class="DataField" data-course-number=""></span>/git-micro-tutorial</code> + <div> <code class="Shell_Code_Prompt">ada@turing42~/ITCS_<span class="DataField" data-course-number=""></span>/git-micro-tutorial</code> <code class="Shell_Code_Input"> git add . </code><br> - <div align="center"> <span class="Shell_Code_Comment"> - [..misc output...] </span></div> - <code class="Shell_Code_Prompt">ada@turing42~/ITCS_<span - - class="DataField" data-course-number=""></span>/git-micro-tutorial</code> - <code class="Shell_Code_Input"> git commit -a -m - "-submitted git-micro-tutorial assignment" </code> - <br> - <div align="center"> <span class="Shell_Code_Comment"> - [..misc output...] </span></div> - <code class="Shell_Code_Prompt">ada@turing42~/ITCS_<span - - class="DataField" data-course-number=""></span>/git-micro-tutorial</code> - <code class="Shell_Code_Input"> git push -u origin - main</code><br> - <div align="center"> <span class="Shell_Code_Comment"> - [..misc output...] </span></div> + <div align="center"> <span class="Shell_Code_Comment"> [..misc output...] </span></div> + <code class="Shell_Code_Prompt">ada@turing42~/ITCS_<span class="DataField" data-course-number=""></span>/git-micro-tutorial</code> + <code class="Shell_Code_Input"> git commit -a -m "-submitted git-micro-tutorial assignment" </code> <br> + <div align="center"> <span class="Shell_Code_Comment"> [..misc output...] </span></div> + <code class="Shell_Code_Prompt">ada@turing42~/ITCS_<span class="DataField" data-course-number=""></span>/git-micro-tutorial</code> + <code class="Shell_Code_Input"> git push -u origin main</code><br> + <div align="center"> <span class="Shell_Code_Comment"> [..misc output...] </span></div> </div> </td> </tr> </tbody> </table> </li> - <li class="Instruction_Todo"> Verify your Git server’s remote - repository. (See Section 9.3 <a href="#Verify_Your_Remote_Repository"> - Verify Your Remote Repository </a> ). </li> + <li class="Instruction_Todo"> Verify your Git server’s remote repository. (See Section 9.3 <a href="#Verify_Your_Remote_Repository"> Verify + Your Remote Repository </a> ). </li> </ol> <p><strong>This completes the Micro Git Tutorial.</strong></p> <ol> @@ -1413,8 +967,8 @@ <h1 id="Section Section_Rubric" class="Section">Rubric</h1> <!-- <div style="border: solid 1px" hidden=""> <p style="background-color: yellow; color: red; text-align: center;"><em>[3/12/2021 - 12:05am] Section Under Construction<br> </em></p> This Tutorial is out of will be 160 total points<br> The rubric is generated from the "<strong>[x pts]</strong>"<strong> </strong>labels<strong> </strong>next to each of the tutorial<strong> </strong><u>Exercise</u><strong>:'s.<br> <br> </strong>ZJW: 3/12/2021: The rubric is nearly complete<strong>.<br> </strong> </div> --> - <div id="Div_Rubric"> - <div> + <div id="Div_Rubric" > + <div id="cursor"> <table id="RubricAwardedPoints" class="RubricAwardedPoints"> <thead> <tr> @@ -1443,11 +997,9 @@ <th scope="col" width="43">Category</th> <th scope="col" width="100">Link</th> <th scope="col" width="max-content">Fraction</th> - <th scope="col" width="fit-content">Points <span class="Instructor_Mode">| - Award</span></th> + <th scope="col" width="fit-content">Points <span class="Instructor_Mode">| Award</span></th> <!-- <th class="Instructor_Mode" scope="col" hidden="" width="43">Full/Partial</th> --> - <!--<th class="Instructor_Mode" scope="col" hidden="" width="25">Awarded</th> --> - <th class="Instructor_Mode" scope="col" hidden="" width="200">Comments</th> + <!--<th class="Instructor_Mode" scope="col" hidden="" width="25">Awarded</th> --> <th class="Instructor_Mode" scope="col" hidden="" width="200">Comments</th> </tr> </tbody> </table> @@ -1457,38 +1009,21 @@ <h1 class="Section">Citations</h1> <!-- <ul class="Citation_List"> --> <ol class="Citation_List"> - <li id="WART2021"> [WART2021] Unix Primer - Basic Commands In the - Unix Shell, <a href="https://webpages.charlotte.edu/%7Ezwartell/Teaching/unix-primer/Unix%20Primer%20-%20Basic%20Commands%20In%20the%20Unix%20Shell.html" + <li id="WART2021"> [WART2021] Unix Primer - Basic Commands In the Unix Shell, <a href="https://webpages.charlotte.edu/%7Ezwartell/Teaching/unix-primer/Unix%20Primer%20-%20Basic%20Commands%20In%20the%20Unix%20Shell.html" target="_blank">https://webpages.charlotte.edu/~zwartell/Teaching/unix-primer/Unix%20Primer%20-%20Basic%20Commands%20In%20the%20Unix%20Shell.html</a> </li> - <li id="Chacon2016"> [Chacon2016] Scott Chacon, Pro Git, - Apress, <strong> 2<sup>nd</sup> Edition </strong> at <a class="WindowOpenLeft" - - onclick="windowOpenLeft('http://git-scm.com/book/en/v2/','ProGit');"> - http://git-scm.com/book/en/<span style="background:yellow">v2</span>/.</a> + <li id="Chacon2016"> [Chacon2016] Scott Chacon, Pro Git, Apress, <strong> 2<sup>nd</sup> Edition </strong> at <a class="WindowOpenLeft" onclick="windowOpenLeft('http://git-scm.com/book/en/v2/','ProGit');"> + http://git-scm.com/book/en/<span style="background:yellow">v2</span>/.</a> </li> + <li id="Microsoft2016"> [Microsoft2016] "To add or change the values of environment variables", Windows XP Professional Product Documentation, + Performance and maintenance. <a href="https://support.microsoft.com/en-us/help/310519/how-to-manage-environment-variables-in-windows-xp" target="_blank">https://support.microsoft.com/en-us/help/310519/how-to-manage-environment-variables-in-windows-xp</a> </li> - <li id="Microsoft2016"> [Microsoft2016] "To add or change the - values of environment variables", Windows XP Professional - Product Documentation, Performance and maintenance. <a href="https://support.microsoft.com/en-us/help/310519/how-to-manage-environment-variables-in-windows-xp" - - target="_blank">https://support.microsoft.com/en-us/help/310519/how-to-manage-environment-variables-in-windows-xp</a> + <li id="GNU2016"> [GNU2016] Bash Reference Manual,<a href="http://www.gnu.org/software/bash/manual/html_node/index.html" target="_blank">http://www.gnu.org/software/bash/manual/html_node/index.html</a> </li> - <li id="GNU2016"> [GNU2016] Bash Reference Manual,<a href="http://www.gnu.org/software/bash/manual/html_node/index.html" - - target="_blank">http://www.gnu.org/software/bash/manual/html_node/index.html</a> - </li> - <li id="WP2016a"> [WP2016a] "Environment Variable : Details", - Wikipedia. <a href="https://en.wikipedia.org/wiki/Environment_variable#Details" - - target="_blank">https://en.wikipedia.org/wiki/Environment_variable#Details</a> + <li id="WP2016a"> [WP2016a] "Environment Variable : Details", Wikipedia. <a href="https://en.wikipedia.org/wiki/Environment_variable#Details" target="_blank">https://en.wikipedia.org/wiki/Environment_variable#Details</a> </li> - <li id="WP2016b"> [WP2016b] "PATH (variable)", Wikipedia. <a href="https://en.wikipedia.org/wiki/PATH_%28variable%29" - - target="_blank">https://en.wikipedia.org/wiki/PATH_%28variable%29</a></li> - <li id="WP2023">[WP2023] "Shell Computing", Wikipedia, <a href="https://en.wikipedia.org/wiki/Shell_%28computing%29" - - target="_blank">https://en.wikipedia.org/wiki/Shell_(computing)</a>. + <li id="WP2016b"> [WP2016b] "PATH (variable)", Wikipedia. <a href="https://en.wikipedia.org/wiki/PATH_%28variable%29" target="_blank">https://en.wikipedia.org/wiki/PATH_%28variable%29</a></li> + <li id="WP2023">[WP2023] "Shell Computing", Wikipedia, <a href="https://en.wikipedia.org/wiki/Shell_%28computing%29" target="_blank">https://en.wikipedia.org/wiki/Shell_(computing)</a>. Accessed Jan. 2023. </li> </ol> </section> @@ -1496,235 +1031,132 @@ <h1 class="Section" id="Open_Source_Modules">Open Source Modules </h1> <p>This HTML5 document uses the following open source modules:</p> <ul> - <li> https://jquery.org/, Copyright jQuery Foundation and other - contributors, MIT license </li> + <li> https://jquery.org/, Copyright jQuery Foundation and other contributors, MIT license </li> </ul> </section> <!-- - <section><h1 class="Appendix" id="cci-gitunccedu_URL_List">Misc: ??? </h1> <section><h2 class="Appendix" id="cci-gitunccedu_URL_List">Course Git URL Lists</h2> <p>This section is for reference only. There are no tutorial instructional steps to be followed in this section.</p> [<em>YourServer</em>=<strong>cci-git</strong>] <div class="Server_Cci_Git"> <p>Below is a list of the git URL’s you will typically use. <br> <br> Your user name and password for all access to the cci-git website is your UNCC username and password. </p> <ol> <li><u>Student Repository</u>: The Git URL is:<br> <span class="Server_Name"> https://cci-git.charlotte.edu/<span class="User_Input">your_uncc_user_id</span><b>/</b><span class="User_Input">name_of_repo_you_created</span>.git <br> </span><br> - </li> <li><u>Course Repository</u>: The course repo’s and material will be found at URL’s such as:<br> <br> <span class="Server_Name"> https://cci-git.charlotte.edu/<span class="User_Input">ITCS_Class_URL_Name</span><b>/</b><span class="User_Input">the_repo_name</span>.git </span> <br> <br> The <span class="User_Input">ITCS_Class_URL_Name</span> will be given you with your assignments or tutorial instructions. <br> <br> </li> <li><u>Web Server</u>: <a href="https://cci-git.charlotte.edu">https://cci-git.charlotte.edu</a><br> <br> You only need to access the website via web browser when creating new repositories and for GitLab specific - operations. Most, git operations will be performed using the Git command-line. </li> </ol> </div> </section> </section> --> + <section><h1 class="Appendix" id="cci-gitunccedu_URL_List">Misc: ??? </h1> <section><h2 class="Appendix" id="cci-gitunccedu_URL_List">Course Git URL Lists</h2> <p>This section is for reference only. There are no tutorial instructional steps to be followed in this section.</p> [<em>YourServer</em>=<strong>cci-git</strong>] <div class="Server_Cci_Git"> <p>Below is a list of the git URL’s you will typically use. <br> <br> Your user name and password for all access to the cci-git website is your UNCC username and password. </p> <ol> <li><u>Student Repository</u>: The Git URL is:<br> <span class="Server_Name"> https://cci-git.charlotte.edu/<span class="User_Input">your_uncc_user_id</span><b>/</b><span class="User_Input">name_of_repo_you_created</span>.git <br> </span><br> </li> <li><u>Course Repository</u>: The course repo’s and material will be found at URL’s such as:<br> <br> <span class="Server_Name"> https://cci-git.charlotte.edu/<span class="User_Input">ITCS_Class_URL_Name</span><b>/</b><span class="User_Input">the_repo_name</span>.git </span> <br> <br> The <span class="User_Input">ITCS_Class_URL_Name</span> will be given you with your assignments or tutorial instructions. <br> <br> </li> <li><u>Web Server</u>: <a href="https://cci-git.charlotte.edu">https://cci-git.charlotte.edu</a><br> <br> You only need to access the website via web browser when creating new repositories and for GitLab specific operations. Most, git operations will be performed using the Git command-line. </li> </ol> </div> </section> </section> --> <section> <h1 class="Appendix">Basic Git Operations </h1> <a id="Basic_Git_Operations" name="Basic_Git_Operations"></a> - <p> This appendix is a reference section, the tutorial instruction - text (Sections 1-6) links to various subsections in this appendix, - and future class assignments may refer back to various subsections - in this Appendix. </p> + <p> This appendix is a reference section, the tutorial instruction text (Sections 1-6) links to various subsections in this appendix, and future + class assignments may refer back to various subsections in this Appendix. </p> <section> - <h2 class="Appendix" id="How_to_Create_New_Remote_Repository">How - to Create New Remote Repository</h2> - Whenever you need to create new remote repository, use the - procedure below. + <h2 class="Appendix" id="How_to_Create_New_Remote_Repository">How to Create New Remote Repository</h2> + Whenever you need to create new remote repository, use the procedure below. <!-- <em> Instructions below vary based on your server.</em> --> <ol class="Instruction Instruction_NonRubric"> <li><a name="_Ref431823815">[<em>YourServer</em><b>=cci-git</b>]</a> <div class="Server_Cci_Git"> <ol> <li> Login to the cci-git.charlotte.edu Web Server </li> - <li>First, make sure you are viewing your "dashboard" on - cci-git by pressing the dashboard button (selection - #1). Then create a new project by - making the selection #2 in the screen capture below. - In screen captures below whenever you must select - multiple buttons, each button press is labeled with a - red box. If multiple selections are needed each - box is labeled with number indicating the sequence in - which you should make the selections.<br> - <figure class="Screen_Capture" tabindex="1"><img src="images/cci-git-New_Project.png" - - alt="TortoiseGit-untracked.png" width="500"></figure> + <li>First, make sure you are viewing your "dashboard" on cci-git by pressing the dashboard button (selection #1). Then + create a new project by making the selection #2 in the screen capture below. In screen captures below whenever you must select + multiple buttons, each button press is labeled with a red box. If multiple selections are needed each box is labeled with number + indicating the sequence in which you should make the selections.<br> + <figure class="Screen_Capture" tabindex="1"><img src="images/cci-git-New_Project.png" alt="TortoiseGit-untracked.png" width="500"></figure> </li> - <li> Create a blank project<span class="Updated_Text_Popup_Note">3/14/2023: - Separated step for clarifity </span><br> - <figure class="Screen_Capture" tabindex="1"><img src="images/cci-git-New_Project2.png" - - alt="TortoiseGit-untracked.png" width="500"></figure> + <li> Create a blank project<span class="Updated_Text_Popup_Note">3/14/2023: Separated step for clarifity </span><br> + <figure class="Screen_Capture" tabindex="1"><img src="images/cci-git-New_Project2.png" alt="TortoiseGit-untracked.png" width="500"></figure> </li> <li>Set up a new project and repo:<br> <br> <br> <ol> - <li>For selection #1, enter the appropriate name for - the repo you are creating.</li> - <li>For selection #2 select your <del> Private Group. - </del> <ins> <span class="Updated_Text_Popup_Note"> - 9/9/2024: In retrospect, selecting the "Private - Group" was a mistake. Doing so causes the - "Private Group" to be the Owner of the repo. But - the student's Git UserID should be the Owner of - the repo. Inviting the Private Group cannot be - done in the "Create Blank Project" dialog. - Additional steps are required. </span> Git - UserID. - - </ins> - <br> + <li>For selection #1, enter the appropriate name for the repo you are creating.</li> + <li>For selection #2 select your <del> Private Group. </del> <ins> <span class="Updated_Text_Popup_Note"> 9/9/2024: In retrospect, + selecting the "Private Group" was a mistake. Doing so causes the "Private Group" to be the Owner of the repo. But the student's + Git UserID should be the Owner of the repo. Inviting the Private Group cannot be done in the "Create Blank Project" dialog. + Additional steps are required. </span> Git UserID. + </ins> <br> <!-- - Your Private Group name will appear similar to the following: - <blockquote> itcs-<span class="DataField" data-course-number=""></span>-wartell/students/<em>FirstName</em> <em>LastName</em> <br> - <br> or <br> - <br> itcs-<span class="DataField" data-course-number=""></span>-wartell/students/<em>Your - UserID</em> </blockquote> - --> </li> + Your Private Group name will appear similar to the following: <blockquote> itcs-<span class="DataField" data-course-number=""></span>-wartell/students/<em>FirstName</em> <em>LastName</em> <br> <br> or <br> <br> itcs-<span class="DataField" data-course-number=""></span>-wartell/students/<em>Your + UserID</em> </blockquote> --> </li> <li>For selection #3, make sure your repo is private</li> - <li>For selection #4, make sure the "README.md" box is - <b>not</b> checked. (You want a completely empty - repo on the server side.) </li> + <li>For selection #4, make sure the "README.md" box is <b>not</b> checked. (You want a completely empty repo on the server side.) </li> </ol> <br> - <figure class="Screen_Capture" tabindex="1"><img src="images/cci-git-Blank_Project.png" - - alt="TortoiseGit-untracked.png" width="500"></figure> + <figure class="Screen_Capture" tabindex="1"><img src="images/cci-git-Blank_Project.png" alt="TortoiseGit-untracked.png" width="500"></figure> </li> - <li hidden="true">Open the Members dialog by making the - menu selections below.<br> - <figure class="Screen_Capture" tabindex="1"><img src="images/cci-git-Project-Infomration.png" - - alt="TortoiseGit-untracked.png" width="500"></figure> + <li hidden="true">Open the Members dialog by making the menu selections below.<br> + <figure class="Screen_Capture" tabindex="1"><img src="images/cci-git-Project-Infomration.png" alt="TortoiseGit-untracked.png" width="500"></figure> </li> - <li hidden="true"> Next, you will add permission for - the professor and TAs to access your project. - Perform the actions indicated in the following screen - captures.<br> + <li hidden="true"> Next, you will add permission for the professor and TAs to access your project. Perform the actions + indicated in the following screen captures.<br> <ol> - <li><u>Select Invite Group</u>: <span class="Updated_Text_Popup_Note"> - 2/13/2023: Updated course workflow to use private - student groups. This simplifies student repo - management and grading. </span> - <figure class="Screen_Capture" tabindex="1"><img src="images/cci-git-Invite-Group.png" - - alt="TortoiseGit-untracked.png" width="500"></figure> + <li><u>Select Invite Group</u>: <span class="Updated_Text_Popup_Note"> 2/13/2023: Updated course workflow to use private student + groups. This simplifies student repo management and grading. </span> + <figure class="Screen_Capture" tabindex="1"><img src="images/cci-git-Invite-Group.png" alt="TortoiseGit-untracked.png" width="500"></figure> </li> <li> <u>Add Your Private Student Group:</u> <br> - Each student in this course has a private group - accessible only to the student (yourself) and the - course grading staff (professor, TA's, graders, - etc.). The group name will be - similar to "itcs-3120-wartell/students/<em>FirstName</em> - <em>LastName" </em>where <em>FirstName</em> and <em>LastName - </em>are your name as recorded in your GitLab - profile. (If a your GitLab profile does - not record a name, then your private group name will - be "itcs-3120-wartell/students/<em>uncc_user_id</em>").<br> + Each student in this course has a private group accessible only to the student (yourself) and the course grading staff (professor, + TA's, graders, etc.). The group name will be similar to "itcs-3120-wartell/students/<em>FirstName</em> <em>LastName" + </em>where <em>FirstName</em> and <em>LastName </em>are your name as recorded in your GitLab profile. (If a your + GitLab profile does not record a name, then your private group name will be "itcs-3120-wartell/students/<em>uncc_user_id</em>").<br> <br> - Invite your private group to your repo, using the - dialog below and give that group "Reporter" access.<br> - <figure class="Screen_Capture" tabindex="1"><img src="images/cci-git-Add-Group.png" - - alt="TortoiseGit-untracked.png" width="500"></figure> + Invite your private group to your repo, using the dialog below and give that group "Reporter" access.<br> + <figure class="Screen_Capture" tabindex="1"><img src="images/cci-git-Add-Group.png" alt="TortoiseGit-untracked.png" width="500"></figure> </li> </ol> </li> - <li> - <ins>Invite Group - Student Private Group - <span class="Updated_Text_Popup_Note"> - 9/19/2024: This step was added as a separate step. Earlier instructions attempted to avoid requiring a separate step, - but the result was the student's Git UserID was no longer the Owner of the repo. - </span> - - </ins> - <br> + <li> <ins>Invite Group - Student Private Group <span class="Updated_Text_Popup_Note"> 9/19/2024: This step was added as a separate step. + Earlier instructions attempted to avoid requiring a separate step, but the result was the student's Git UserID was no longer the + Owner of the repo. </span> </ins> <br> <br> - <p> - On the GitLab server, each repo has at least one <em>Owner</em>. - The Owner can invite other GitLab users as <em>Members</em> - to that repo. The Owner controls what access permissions - a Member has. Further, GitLab allows Members to be - composed into GitLab Groups. <em id="Private_Student_Group">Student - (Individual) Private Group:</em> The instructor for - this class has created a unique GitLab Group for each - student. These groups are referred to as Student Private - Group's. Each group has its visiblity set to <a href="https://docs.gitlab.com/ee/user/public_access.html">private</a>. - It is visible only to the associated student and the - instructor and TAs. - </p> - <p> - When you create any GitLab repository for this course, you must Group Invite your student private group to you repo, so that the - course staff can access your repo. - </p> + <p> On the GitLab server, each repo has at least one <em>Owner</em>. The Owner can invite other GitLab users as <em>Members</em> + to that repo. The Owner controls what access permissions a Member has. Further, GitLab allows Members to be composed into GitLab + Groups. <em id="Private_Student_Group">Student (Individual) Private Group:</em> The instructor for this class has created a unique + GitLab Group for each student. These groups are referred to as Student Private Group's. Each group has its visiblity set to <a href="https://docs.gitlab.com/ee/user/public_access.html">private</a>. + It is visible only to the associated student and the instructor and TAs. </p> + <p> When you create any GitLab repository for this course, you must Group Invite your student private group to you repo, so that the + course staff can access your repo. </p> <ol> <li> Starting with the left side menu, select <span class="File_Name">Manage</span> and then <span class="File_Name">Members</span> - <figure class="Screen_Capture" tabindex="1"><img src="images/cci-git-Invite-Members-2.png" - - alt="TortoiseGit-untracked.png" width="500"></figure> - + <figure class="Screen_Capture" tabindex="1"><img src="images/cci-git-Invite-Members-2.png" alt="TortoiseGit-untracked.png" width="500"></figure> </li> <li> Now from the <span class="File_Name">Members</span> page, select <span class="File_Name">Invite Group</span> - <figure class="Screen_Capture" tabindex="1"><img src="images/cci-git-Invite-Group-2-1.png" - - alt="TortoiseGit-untracked.png" width="500"></figure> - + <figure class="Screen_Capture" tabindex="1"><img src="images/cci-git-Invite-Group-2-1.png" alt="TortoiseGit-untracked.png" width="500"></figure> </li> - <li> In <span class="File_Name">Invite Group</span> popup dialog, select your student private group and give the group the "Maintainer" role. - Your student private group name will something like <span class="File_Name">itcs-<span class="DataField" data-course-number=""></span>/students/<em>Your-Git-UserID</em></span> - <figure class="Screen_Capture" tabindex="1"><img src="images/cci-git-Invite-Group-2-2.png" - alt="TortoiseGit-untracked.png" width="500"></figure> + <li> In <span class="File_Name">Invite Group</span> popup dialog, select your student private group and give the group the + "Maintainer" role. Your student private group name will something like <span class="File_Name">itcs-<span class="DataField" data-course-number=""></span>/students/<em>Your-Git-UserID</em></span> + <figure class="Screen_Capture" tabindex="1"><img src="images/cci-git-Invite-Group-2-2.png" alt="TortoiseGit-untracked.png" width="500"></figure> </li> </ol> </li> - <li>Next, you should disable the Auto DevOps feature for - your project. (Otherwise gitlab is likely to - generate extra error messages later on when you perform - git command line operations).<br> + <li>Next, you should disable the Auto DevOps feature for your project. (Otherwise gitlab is likely to generate extra error messages + later on when you perform git command line operations).<br> <br> <ol> - <li>Open the <span class="File_Name">Settings</span> - and <span class="File_Name"></span><span class="File_Name">CI/CD</span>. - <figure class="Screen_Capture"><img src="images/cci-git-CI-CD.png" - - alt="TortoiseGit-untracked.png" width="500"></figure> + <li>Open the <span class="File_Name">Settings</span> and <span class="File_Name"></span><span class="File_Name">CI/CD</span>. + <figure class="Screen_Capture"><img src="images/cci-git-CI-CD.png" alt="TortoiseGit-untracked.png" width="500"></figure> </li> - <li>Under Auto DevOps click Open the <span class="File_Name">Expand.</span><span - - class="File_Name"></span> - <figure class="Screen_Capture" tabindex="1"><img src="images/cci-git-ADO-Expand.png" - - alt="TortoiseGit-untracked.png" width="500"></figure> + <li>Under Auto DevOps click Open the <span class="File_Name">Expand.</span><span class="File_Name"></span> + <figure class="Screen_Capture" tabindex="1"><img src="images/cci-git-ADO-Expand.png" alt="TortoiseGit-untracked.png" width="500"></figure> </li> - <li><u>Un</u>check the checkbox, <span class="File_Name">Default - to AutoDevOps Pipeline</span>, and click <span class="File_Name">Save + <li><u>Un</u>check the checkbox, <span class="File_Name">Default to AutoDevOps Pipeline</span>, and click <span class="File_Name">Save Changes.</span> - <figure class="Screen_Capture" tabindex="1"><img src="images/cci-git-ADO-Default.png" - - alt="TortoiseGit-untracked.png" width="500"></figure> + <figure class="Screen_Capture" tabindex="1"><img src="images/cci-git-ADO-Default.png" alt="TortoiseGit-untracked.png" width="500"></figure> </li> </ol> <br> <br> </li> - <li>Finally, you should verify that you can clone the new - repository. To determine the URL make the - selection below: - <figure class="Screen_Capture" tabindex="1"><img src="images/cci-git-Get-URL.png" - - alt="TortoiseGit-untracked.png" width="500"></figure> + <li>Finally, you should verify that you can clone the new repository. To determine the URL make the selection below: + <figure class="Screen_Capture" tabindex="1"><img src="images/cci-git-Get-URL.png" alt="TortoiseGit-untracked.png" width="500"></figure> Then clone the repo: <table class="Code_Example"> <tbody> <tr> - <td> <button onclick="Code_Example_Toggle('Code_Example_9_1_7');">▽ - </button> </td> + <td> <button onclick="Code_Example_Toggle('Code_Example_9_1_7');">▽ </button> </td> <td> - <div style="height: 150px; background-color: black;"> - <code class="Shell_Code_Input"> <code class="Shell_Code_Input"> - <code class="Shell_Code_Prompt"> ~/ITCS_<span - - class="DataField" data-course-number=""></span>/ - </code> mkdir verify; cd verify <br> - <code class="Shell_Code_Prompt"> ~/ITCS_<span - - class="DataField" data-course-number=""></span>/verify - </code> <code class="Shell_Code_Input"> - $ git clone <code class="User_Input">URL - Prefix For The Repo</code>/my-first-repo.git - <br> </code> <code class="Shell_Code_Output"> - Cloning into 'my-first-repo'...<br> - warning: You appear to have cloned an - empty repository.<br> + <div style="height: 150px; background-color: black;"> <code class="Shell_Code_Input"> <code class="Shell_Code_Input"> <code class="Shell_Code_Prompt"> + ~/ITCS_<span class="DataField" data-course-number=""></span>/ </code> mkdir verify; cd verify <br> + <code class="Shell_Code_Prompt"> ~/ITCS_<span class="DataField" data-course-number=""></span>/verify </code> <code class="Shell_Code_Input"> + $ git clone <code class="User_Input">URL Prefix For The Repo</code>/my-first-repo.git <br> + </code> <code class="Shell_Code_Output"> Cloning into 'my-first-repo'...<br> + warning: You appear to have cloned an empty repository.<br> Checking connectivity... done. </code><br> - <code class="Shell_Code_Input"> $ ls - my-first-repo </code><br> + <code class="Shell_Code_Input"> $ ls my-first-repo </code><br> </code></code></div> <code class="Shell_Code_Input"> </code></td> </tr> @@ -1735,120 +1167,71 @@ </div> </li> </ol> - <ins datetime="8/26/2024"> <span class="Updated_Text_Popup_Note">Add - this statement for clarification</span> You have completed - this section. Do <u>not</u> proceed to the section below. - Return to the document location that brought you here. </ins> </section> + <ins datetime="8/26/2024"> <span class="Updated_Text_Popup_Note">Add this statement for clarification</span> You have completed this section. Do + <u>not</u> proceed to the section below. Return to the document location that brought you here. </ins> </section> <section> <h2 class="Appendix">How to Push New Remote Repository</h2> - Whenever you need to push files to a new <u>empty</u>, - server-side repository, follow the procedure below. Assume the - remote is called <span class="File_Name">Project_Example.git</span>: - <br> + Whenever you need to push files to a new <u>empty</u>, server-side repository, follow the procedure below. Assume the remote is + called <span class="File_Name">Project_Example.git</span>: <br> <ol class="Instruction_Option"> <li> [<em>YourServer</em>=<strong>cci-git</strong>] <div class="Server_Cci_Git"> <ol> - <li><strong>Option I</strong>: <strong>git clone</strong>: - <br> - Use Option I, if you have <u>not</u> previously - created files in a local directory. Perform the - following:<br> + <li><strong>Option I</strong>: <strong>git clone</strong>: <br> + Use Option I, if you have <u>not</u> previously created files in a local directory. Perform the following:<br> <table class="Code_Example"> <tbody> <tr> - <td> <button onclick="Code_Example_Toggle('Code_Example_9_1_7');">▽ - </button> </td> + <td> <button onclick="Code_Example_Toggle('Code_Example_9_1_7');">▽ </button> </td> <td> - <div style="height: 150px;"> <code class="Shell_Code_Input"> - $ git clone <code class="User_Input">URL - Prefix For The Repo</code>/Project_Example.git<br> - </code> <code class="Shell_Code_Output"> - Cloning into 'Project_Example'...<br> - warning: You appear to have cloned an empty - repository.<br> + <div style="height: 150px;"> <code class="Shell_Code_Input"> $ git clone <code class="User_Input">URL Prefix For The Repo</code>/Project_Example.git<br> + </code> <code class="Shell_Code_Output"> Cloning into 'Project_Example'...<br> + warning: You appear to have cloned an empty repository.<br> Checking connectivity... done. </code><br> - <code class="Shell_Code_Input"> $ cd - Project_Example </code><br> - <span class="Shell_Code_Comment">[… create, - add and commit files… below is just an - example] </span> $ touch README.md<br> + <code class="Shell_Code_Input"> $ cd Project_Example </code><br> + <span class="Shell_Code_Comment">[… create, add and commit files… below is just an example] </span> $ touch README.md<br> $ git add README.md<br> $ git commit -m "add README"<br> - <code class="Shell_Code_Output"> [ main - (root-commit) dd8e1a0] add README<br> - 1 file changed, 0 insertions(+), 0 - deletions(-)<br> - create mode 100644 README.md </code> - $ git push -u origin main <code - - class="Shell_Code_Input"><br> - $ git push -u origin main <ins datetime="2021-08-28"> - </ins> </code><br> - <code class="Shell_Code_Output"> Counting - objects: 3, done.<br> - Writing objects: 100% (3/3), 219 bytes | 0 - bytes/s, done.<br> + <code class="Shell_Code_Output"> [ main (root-commit) dd8e1a0] add README<br> + 1 file changed, 0 insertions(+), 0 deletions(-)<br> + create mode 100644 README.md </code> $ git push -u origin main <code class="Shell_Code_Input"><br> + $ git push -u origin main <ins datetime="2021-08-28"> </ins> </code><br> + <code class="Shell_Code_Output"> Counting objects: 3, done.<br> + Writing objects: 100% (3/3), 219 bytes | 0 bytes/s, done.<br> Total 3 (delta 0), reused 0 (delta 0)<br> - To - git@cci-git.charlotte.edu:your_user_id/Project_Example.git - </code><br> + To git@cci-git.charlotte.edu:your_user_id/Project_Example.git </code><br> </div> </td> </tr> </tbody> </table> </li> - <li><strong>Option II</strong>: <strong> git - init: </strong><br> - Use Option II, if you <u>already</u> have - files in a local directory, and you want to make the - local directory local git repo and then push it to your - pre-existing remote repo. Perform the following:<br> + <li><strong>Option II</strong>: <strong> git init: </strong><br> + Use Option II, if you <u>already</u> have files in a local directory, and you want to make the local directory local git repo + and then push it to your pre-existing remote repo. Perform the following:<br> <table class="Code_Example" id="Code_Example_9_1_8"> <tbody> <tr> - <td> <button onclick="Code_Example_Toggle('Code_Example_9_1_8');">▽ - </button> </td> + <td> <button onclick="Code_Example_Toggle('Code_Example_9_1_8');">▽ </button> </td> <td> - <div> <code class="Shell_Code_Prompt"> ~/ITCS_<span - - class="DataField" data-course-number=""></span>/Project_Example - <code class="Shell_Code_Input"> $ git init<br> - </code> <code class="Shell_Code_Output"> - Initialized empty Git repository in - Project_Example/.git/ </code><br> - <code class="Shell_Code_Prompt"> ~/ITCS_<span - - class="DataField" data-course-number=""></span>/Project_Example - <code class="Shell_Code_Input"> $ git - remote add origin - https://cci-git.charlotte.edu/your_user_id/Project_Example.git<br> - <code class="Shell_Code_Prompt"> ~/ITCS_<span - - class="DataField" data-course-number=""></span>/Project_Example - </code> <code class="Shell_Code_Input"> - $ git add -A<br> - </code> <code class="Shell_Code_Prompt"> - ~/ITCS_<span class="DataField" data-course-number=""></span>/Project_Example - </code> <code class="Shell_Code_Input">$ - git commit –m "-initial import" </code><br> - <code class="Shell_Code_Prompt"> ~/ITCS_<span - - class="DataField" data-course-number=""></span>/Project_Example - </code> <code class="Shell_Code_Input">$ - git push -u origin main </code><br> - <code class="Shell_Code_Output"> - Counting objects: 3, done.<br> - Writing objects: 100% (3/3), 219 bytes - | 0 bytes/s, done.<br> + <div> <code class="Shell_Code_Prompt"> ~/ITCS_<span class="DataField" data-course-number=""></span>/Project_Example <code class="Shell_Code_Input"> + $ git init<br> + </code> <code class="Shell_Code_Output"> Initialized empty Git repository in Project_Example/.git/ </code><br> + <code class="Shell_Code_Prompt"> ~/ITCS_<span class="DataField" data-course-number=""></span>/Project_Example <code class="Shell_Code_Input"> + $ git remote add origin https://cci-git.charlotte.edu/your_user_id/Project_Example.git<br> + <code class="Shell_Code_Prompt"> ~/ITCS_<span class="DataField" data-course-number=""></span>/Project_Example </code> <code + + class="Shell_Code_Input"> $ git add -A<br> + </code> <code class="Shell_Code_Prompt"> ~/ITCS_<span class="DataField" data-course-number=""></span>/Project_Example </code> + <code class="Shell_Code_Input">$ git commit –m "-initial import" </code><br> + <code class="Shell_Code_Prompt"> ~/ITCS_<span class="DataField" data-course-number=""></span>/Project_Example </code> <code + + class="Shell_Code_Input">$ git push -u origin main </code><br> + <code class="Shell_Code_Output"> Counting objects: 3, done.<br> + Writing objects: 100% (3/3), 219 bytes | 0 bytes/s, done.<br> Total 3 (delta 0), reused 0 (delta 0)<br> - To git@cci-git.charlotte.edu:<em>your_user_id</em>/Project_Example.git - </code> </code></code></code></div> <code - - class="Shell_Code_Prompt"><code class="Shell_Code_Prompt"><code - - class="Shell_Code_Input"> </code></code></code></td> + To git@cci-git.charlotte.edu:<em>your_user_id</em>/Project_Example.git </code> </code></code></code></div> + <code class="Shell_Code_Prompt"><code class="Shell_Code_Prompt"><code class="Shell_Code_Input"> </code></code></code></td> </tr> </tbody> </table> @@ -1859,67 +1242,47 @@ <!-- <li> [<em>YourServer</em>=<strong>Bitbucket</strong>] <div class="Server_Git_Viscenter Server_Bitbucket"> <br> <br> Perform the same instructions as above, Option II, for [<strong>cci-git</strong>] but replace:<br> <span class="Server_Name"> https://cci-git.charlotte.edu/<u> <span class="User_Input">your_uncc_user_id</span> </u>/ </span><br> with<br> [<strong>bitbucket</strong>] <span class="Server_Name"> git@bitbucket.org:<u><span class="User_Input">your_user_id</span></u> </span><br> <span class="Server_Name"> <u><span class="User_Input"></span></u> </span> </div> </li> --> </ol> - <ins datetime="8/26/2024"> <span class="Updated_Text_Popup_Note">Add - this statement for clarification</span> You have completed - this section. Do <u>not</u> proceed to the section below. - Return to the document location that brought you here. </ins> </section> + <ins datetime="8/26/2024"> <span class="Updated_Text_Popup_Note">Add this statement for clarification</span> You have completed this section. Do + <u>not</u> proceed to the section below. Return to the document location that brought you here. </ins> </section> <section> <h2 class="Appendix">Deleting a remote repo</h2> <ol class="Instruction_Option"> - <li> [<em>YourServer=</em><strong>cci-git</strong>] See <a href="https://cci-git.charlotte.edu/help" - - target="_blank">https://cci-git.charlotte.edu/help</a><br> + <li> [<em>YourServer=</em><strong>cci-git</strong>] See <a href="https://cci-git.charlotte.edu/help" target="_blank">https://cci-git.charlotte.edu/help</a><br> </li> <!-- <li> [<em>YourServer</em>=<strong>Bitbucket</strong>] <em> See Bitbucket Website. </em> </li> --> </ol> - <ins datetime="8/26/2024"> <span class="Updated_Text_Popup_Note">Add - this statement for clarification</span> You have completed - this section. Do <u>not</u> proceed to the section below. - Return to the document location that brought you here. </ins> </section> + <ins datetime="8/26/2024"> <span class="Updated_Text_Popup_Note">Add this statement for clarification</span> You have completed this section. Do + <u>not</u> proceed to the section below. Return to the document location that brought you here. </ins> </section> </section> <section> <h1 class="Appendix" id="CourseGitPolicies">Course Git Policies</h1> - <p>This appendix is a reference section, the tutorial itself - (Sections 1-6) links to various subsections in this appendix. </p> - <p>This appendix is designed as a reference. The tutorial sequence - (found in Sections 1-6) and future class assignments refer to - various subsections in this Appendix. </p> + <p>This appendix is a reference section, the tutorial itself (Sections 1-6) links to various subsections in this appendix. </p> + <p>This appendix is designed as a reference. The tutorial sequence (found in Sections 1-6) and future class assignments refer to various subsections + in this Appendix. </p> <section> <h2 class="Appendix">Submitting Class Assignments</h2> - <p> Submit all your assignments by using Git add, commit and push - to upload your code to your Git repository subdirectory. </p> + <p> Submit all your assignments by using Git add, commit and push to upload your code to your Git repository subdirectory. </p> <div> - <p> Your projects will be graded based on the version of your - code that is git-push’ed to the Git server at - the time of the due date for the project. </p> + <p> Your projects will be graded based on the version of your code that is git-push’ed to the Git server at the time of the due + date for the project. </p> </div> </section> <section> <h2 class="Appendix">Keep the repository clean!!!</h2> - <p> It is standard practice when using version control software to - not commit intermediate or output files generated by the - compiler into the repository. Intermediate or output - compilation files are all regenerated when someone else - checkout’s the source code and recompiles it. Like all compilers - MSVS 20xx C++ compiler generates lots of these (*.ncb, - *.ilk, *.exe, *.obj, etc.). <br> + <p> It is standard practice when using version control software to not commit intermediate or output files generated by the compiler into the + repository. Intermediate or output compilation files are all regenerated when someone else checkout’s the source code and recompiles it. + Like all compilers MSVS 20xx C++ compiler generates lots of these (*.ncb, *.ilk, *.exe, *.obj, etc.). <br> <br> </p> - <p align="center"><strong>Rule</strong>: Do not commit such - intermediate files to your Git repository! </p> - <p> Fortunately, you can automate this process using - the .gitignore mechanism (see <a class="Citation" href="#Chacon2016">[Chacon2016]</a>). + <p align="center"><strong>Rule</strong>: Do not commit such intermediate files to your Git repository! </p> + <p> Fortunately, you can automate this process using the .gitignore mechanism (see <a class="Citation" href="#Chacon2016">[Chacon2016]</a>). </p> <p><em>Reasoning:</em></p> - <p> Adding intermediate auto-generated files to the repository is - wasteful, messy and can create subtle problems. Many - intermediate files will create compilation problems if they are - copied between different computers. Putting them in the - repository is equivalent to such copying. </p> - <p> By convention, the following files should be put in the - repository depending on your programming language and - development tools. </p> + <p> Adding intermediate auto-generated files to the repository is wasteful, messy and can create subtle problems. Many intermediate files + will create compilation problems if they are copied between different computers. Putting them in the repository is equivalent to such + copying. </p> + <p> By convention, the following files should be put in the repository depending on your programming language and development tools. </p> <section> <h3 class="Appendix">C++ Code Rules</h3> The following files should be put in the repository: @@ -1931,8 +1294,7 @@ .vcxproj, .sln, .vcxproj.user <ul> <li> Under earlier MSVS versions: <br> - .vcproj, .sln, - .vcproj.<username>.<machinename>.user </li> + .vcproj, .sln, .vcproj.<username>.<machinename>.user </li> </ul> </li> <li>CMake files</li> @@ -1940,17 +1302,13 @@ </li> </ul> <ul type="disc"> - <li> a .txt file or .doc file describing what parts of the - project you completed or left incomplete, etc. </li> - <li> any input files such as image files or other data files - required by your program </li> + <li> a .txt file or .doc file describing what parts of the project you completed or left incomplete, etc. </li> + <li> any input files such as image files or other data files required by your program </li> <li> any subdirectories containing the above files<br> </li> </ul> - <p> When adding subdirectories, be careful not to blindly submit - their entire contents because often they contain additional - automatically generated files. If you make a - mistake just delete the intermediate files from the repo. </p> + <p> When adding subdirectories, be careful not to blindly submit their entire contents because often they contain additional automatically + generated files. If you make a mistake just delete the intermediate files from the repo. </p> </section> <section> <h3 class="Appendix">JavaScript and WebGL Code Rules</h3> @@ -1964,45 +1322,30 @@ </li> <li> compilation scripts or project files <ul type="circle"> - <li> these will depend on your IDE. Google - search will usually turn up a forum discussion on which - project files from a particular IDE should be commit'ed - to a repo. </li> + <li> these will depend on your IDE. Google search will usually turn up a forum discussion on which project files from a + particular IDE should be commit'ed to a repo. </li> </ul> </li> - <li> a .txt file or .doc file describing what parts of the - project you completed or left incomplete, etc. </li> - <li> any input files such as image files or other data files - required by your program </li> + <li> a .txt file or .doc file describing what parts of the project you completed or left incomplete, etc. </li> + <li> any input files such as image files or other data files required by your program </li> <li> any subdirectories containing the above files<br> </li> </ul> - <p> When adding subdirectories, be careful not to blindly submit - their entire contents because often they contain additional - automatically generated inetermediate files. - If you make a mistake just git delete the intermediate files - from the repo. </p> + <p> When adding subdirectories, be careful not to blindly submit their entire contents because often they contain additional automatically + generated inetermediate files. If you make a mistake just git delete the intermediate files from the repo. </p> </section> </section> <section> - <h2 class="Appendix"><a id="Verify_Your_Remote_Repository" name="Verify_Your_Remote_Repository"></a>Verify - Your Remote Repository </h2> + <h2 class="Appendix"><a id="Verify_Your_Remote_Repository" name="Verify_Your_Remote_Repository"></a>Verify Your Remote Repository </h2> <p>The TA only sees your remote Git server repo’s.</p> - <p align="center"><strong>Rule</strong>: Always make sure - your assignment appears as you expect in the remote repo (on the - Git server). </p> + <p align="center"><strong>Rule</strong>: Always make sure your assignment appears as you expect in the remote repo (on the Git server). </p> <p><em>The Ultimate Verification</em>:</p> - <p> The ultimate way to verify the remote repo contains the files - you think it does is to clone it into to another directory and - check that second cloned copy for completeness. You - should do this when you are completely done with your - assignment. </p> + <p> The ultimate way to verify the remote repo contains the files you think it does is to clone it into to another directory and check that second + cloned copy for completeness. You should do this when you are completely done with your assignment. </p> <p> <em>Some Safety Checks:</em><br> </p> - <p> Performing<em> The Ultimate Verification</em> while - you are developing code is tedious. During software development - the following are good practices to keep track of your commit’s - and push’s.<br> + <p> Performing<em> The Ultimate Verification</em> while you are developing code is tedious. During software development the following + are good practices to keep track of your commit’s and push’s.<br> </p> <ul type="disc"> <li><strong>git-status</strong><br> @@ -2011,102 +1354,73 @@ <table class="Code_Example" id="Code_Example_10_3_1"> <tbody> <tr> - <td> <button onclick="Code_Example_Toggle('Code_Example_10_3_1');"> - ▽ </button> </td> + <td> <button onclick="Code_Example_Toggle('Code_Example_10_3_1');"> ▽ </button> </td> <td> - <div><code class="Shell_Code_Prompt"> - lucretius@CCIWD-435B-1 ~/ITCS_4120/Project_42<br> - </code> <code class="Shell_Code_Input"> $ git - status<br> - </code><code class="Shell_Code_Output"> # On branch - main <br> - nothing to commit, working directory clean </code><code - - class="Shell_Code_Output"> <br> + <div><code class="Shell_Code_Prompt"> lucretius@CCIWD-435B-1 ~/ITCS_4120/Project_42<br> + </code> <code class="Shell_Code_Input"> $ git status<br> + </code><code class="Shell_Code_Output"> # On branch main <br> + nothing to commit, working directory clean </code><code class="Shell_Code_Output"> <br> </code></div> </td> </tr> </tbody> </table> <br> - The above indicates everything is good. You have - no file changes that have not been committed to the local repo - and no local repo commits that have not been pushed to the - remote repo.<br> + The above indicates everything is good. You have no file changes that have not been committed to the local repo and no local repo + commits that have not been pushed to the remote repo.<br> <br> <em>Maybe Bad:</em><br> If you get messages like: <table class="Code_Example"> <tbody> <tr> - <td> <button onclick="Code_Example_Toggle('Code_Example_10_3_2');"> - ▽ </button> </td> + <td> <button onclick="Code_Example_Toggle('Code_Example_10_3_2');"> ▽ </button> </td> <td> - <div><code class="Shell_Code_Prompt"> - lucretius@CCIWD-435B-1 ~/ITCS_4120/Project_42<br> - </code> <code class="Shell_Code_Input"> $ git - status<br> - </code><code class="Shell_Code_Output"> # On branch - main <br> + <div><code class="Shell_Code_Prompt"> lucretius@CCIWD-435B-1 ~/ITCS_4120/Project_42<br> + </code> <code class="Shell_Code_Input"> $ git status<br> + </code><code class="Shell_Code_Output"> # On branch main <br> # Untracked files:<br> - # (use "git add <file>..." to - include in what will be committed)<br> + # (use "git add <file>..." to include in what will be committed)<br> #<br> - # <span style="color:red;">junk_or_important.txt</span> - </code></div> + # <span style="color:red;">junk_or_important.txt</span> </code></div> </td> </tr> </tbody> </table> <br> - then you have untracked files (but you have push’ed all your - commits). This maybe ok as along as these files aren’t - files that belong in a repo (such as temporary files). - You might consider adding to the .gitignore file (see <a class="Citation" - - href="#Chacon2016">[Chacon2016]</a>).<br> + then you have untracked files (but you have push’ed all your commits). This maybe ok as along as these files aren’t files that belong in + a repo (such as temporary files). You might consider adding to the .gitignore file (see <a class="Citation" href="#Chacon2016">[Chacon2016]</a>).<br> <br> <em>Bad:</em><br> If you get a message like:<br> <table class="Code_Example"> <tbody> <tr> - <td> <button onclick="Code_Example_Toggle('Code_Example_10_3_2');"> - ▽ </button> </td> + <td> <button onclick="Code_Example_Toggle('Code_Example_10_3_2');"> ▽ </button> </td> <td> - <div><code class="Shell_Code_Prompt"> - lucretius@CCIWD-435B-1 ~/ITCS_4120/Project_42<br> - </code> <code class="Shell_Code_Input"> $ git - status<br> - </code><code class="Shell_Code_Output"> # On branch - main <br> - # Your branch is ahead of 'origin/main ' by 1 - commit.<br> - # (use "git push" to publish your - local commits)<br> + <div><code class="Shell_Code_Prompt"> lucretius@CCIWD-435B-1 ~/ITCS_4120/Project_42<br> + </code> <code class="Shell_Code_Input"> $ git status<br> + </code><code class="Shell_Code_Output"> # On branch main <br> + # Your branch is ahead of 'origin/main ' by 1 commit.<br> + # (use "git push" to publish your local commits)<br> #<br> - nothing to commit, working directory clean </code>then - </div> </td> + nothing to commit, working directory clean </code>then </div> + </td> </tr> </tbody> </table> - then you have not pushed all your latest changes to - the remote repo. Do a git-push before the final - assignment deadline. <br> + then you have not pushed all your latest changes to the remote repo. Do a git-push before the final assignment + deadline. <br> <br> </li> <!-- Keeping this up to date with tortoisegit or whatever is the current 'popular' cross-platform git gui is too tedious - <li><strong>[Optional] TortoiseGit</strong> – Optionally, another good way to check with the TortoiseGit shell extension is using Check for Modifications. This will show you whether you have any changes not commited to the local repo (but make sure to check the box, Show Unversioned Files). Below we see one file is untracked.<br> <figure class="Screen_Capture" tabindex="1"><img src="images/TortoiseGit-Untracked.png" alt="TortoiseGit-untracked.png" width="500"> </figure> <br> However, Check for Modifications will not tell you whether you have pushed all your commits to the remote repo. <br> <br> For that use the TortoiseGit shell extension and select Git Sync. The following Git Sync dialog box would indicate - your local repo has committed changes that you have not pushed to the server remote repo: <figure class="Screen_Capture" tabindex="1"><img src="images/TortoiseGit-Nonversioned.png" alt="images/TortoiseGit-Nonversioned.png" width="500"></figure> <br> </li> --> + <li><strong>[Optional] TortoiseGit</strong> – Optionally, another good way to check with the TortoiseGit shell extension is using Check for Modifications. This will show you whether you have any changes not commited to the local repo (but make sure to check the box, Show Unversioned Files). Below we see one file is untracked.<br> <figure class="Screen_Capture" tabindex="1"><img src="images/TortoiseGit-Untracked.png" alt="TortoiseGit-untracked.png" width="500"> </figure> <br> However, Check for Modifications will not tell you whether you have pushed all your commits to the remote repo. <br> <br> For that use the TortoiseGit shell extension and select Git Sync. The following Git Sync dialog box would indicate your local repo has committed changes that you have not pushed to the server remote repo: <figure class="Screen_Capture" tabindex="1"><img src="images/TortoiseGit-Nonversioned.png" alt="images/TortoiseGit-Nonversioned.png" width="500"></figure> <br> </li> --> </ul> - <p> However, <span class="Program_Name">Git Sync</span> does not - show you if you have changes to local files that you have not - commited to the local repo! </p> + <p> However, <span class="Program_Name">Git Sync</span> does not show you if you have changes to local files that you have not commited to the + local repo! </p> </section> - <ins datetime="8/26/2024"> <span class="Updated_Text_Popup_Note">Add - this statement for clarification</span> You have completed this - section. Do <u>not</u> proceed to the section below. Return to - the document location that brought you here. </ins> </section> + <ins datetime="8/26/2024"> <span class="Updated_Text_Popup_Note">Add this statement for clarification</span> You have completed this section. Do <u>not</u> + proceed to the section below. Return to the document location that brought you here. </ins> </section> </article> </div> </div> @@ -2119,9 +1433,9 @@ <td> Assignment: "? minutes to do"</td> </tr> <tr> - <td><input onclick='new GradingScript({category : "MSVSSolution", projectDirectory : "MSVS-CSharp-Tutorial/Arrays" }).downloadScript();' + <td><input onclick='new GradingScript({category : "MSVSSolution", projectDirectory : "MSVS-CSharp-Tutorial/Arrays" }).downloadScript();' value="Grade" - value="Grade" type="button"></td> + type="button"></td> </tr> </tbody> </table> diff --git a/www-site/git_modules/zjwgi b/www-site/git_modules/zjwgi index efdeef697e0ec28592f0c8bb04e446f9c85b143d..98c9dcb69545ade33e2ccf719af63b71b269d4fb 160000 --- a/www-site/git_modules/zjwgi +++ b/www-site/git_modules/zjwgi @@ -1 +1 @@ -Subproject commit efdeef697e0ec28592f0c8bb04e446f9c85b143d +Subproject commit 98c9dcb69545ade33e2ccf719af63b71b269d4fb