Changes

Jump to navigation Jump to search
169 bytes added ,  14:18, 31 May 2023
Line 3: Line 3:  
== <u>The Setup</u> ==
 
== <u>The Setup</u> ==
 
<ol>
 
<ol>
 +
<!-- Step 1 -->
 
   <li>Sign up for a GitHub account by going to the [https://github.com/ GitHub website] and create a new account<br><i>- If you do not make your email address public you will have problems pushing your code later</i></li><br>
 
   <li>Sign up for a GitHub account by going to the [https://github.com/ GitHub website] and create a new account<br><i>- If you do not make your email address public you will have problems pushing your code later</i></li><br>
 +
 +
<!-- Step 2 -->
 
   <li>Once you're logged in, click on the "+" sign at the top-right corner of the GitHub homepage and select "New repository" to create a new repository. Give your repository a name and provide a description.</li>
 
   <li>Once you're logged in, click on the "+" sign at the top-right corner of the GitHub homepage and select "New repository" to create a new repository. Give your repository a name and provide a description.</li>
 
     <ul>
 
     <ul>
Line 17: Line 20:  
         </ul>
 
         </ul>
 
     </ul>
 
     </ul>
 +
 +
<!-- Step 3 -->
 
   <li>Once the repository is setup online, add a Personal Access Token</li>
 
   <li>Once the repository is setup online, add a Personal Access Token</li>
 
     <ul>
 
     <ul>
Line 29: Line 34:  
         </ul>
 
         </ul>
 
     </ul>
 
     </ul>
 +
 +
<!-- Step 4 -->
 
   <li>Clone your repository</li>
 
   <li>Clone your repository</li>
 
     <ul>
 
     <ul>
Line 39: Line 46:  
     </ul><br>
 
     </ul><br>
    +
<!-- Step 5 -->
 
   <li>At this point you should have a new folder in your annex with the name of your GitHub repository</li>
 
   <li>At this point you should have a new folder in your annex with the name of your GitHub repository</li>
 
     <ul>
 
     <ul>
Line 44: Line 52:  
       <li>If needed, you can link the local repository to the remote repository using:<br> <b>git remote add origin &lt;repository-url&gt;</b><br></li>
 
       <li>If needed, you can link the local repository to the remote repository using:<br> <b>git remote add origin &lt;repository-url&gt;</b><br></li>
 
     </ul><br>
 
     </ul><br>
 +
 +
<!-- Step 6 -->
 
   <li>To switch to or determine a branch in Git, you can use the git checkout command:
 
   <li>To switch to or determine a branch in Git, you can use the git checkout command:
 
     <ul>
 
     <ul>
Line 49: Line 59:  
       <li>Create a new branch using: <br> <b>git branch new-branch-name</b> then use <b>git checkout new-branch-name</b> to switch to that branch and work in it<br> OR <br> <b>git checkout -b new-branch-name</b> will create and switch to the new branch in one step</li><br>
 
       <li>Create a new branch using: <br> <b>git branch new-branch-name</b> then use <b>git checkout new-branch-name</b> to switch to that branch and work in it<br> OR <br> <b>git checkout -b new-branch-name</b> will create and switch to the new branch in one step</li><br>
 
     </ul>
 
     </ul>
 +
 +
<!-- Step 7 -->
 
   <li>Add files/folders to your directory</li><br>
 
   <li>Add files/folders to your directory</li><br>
 +
 +
<!-- Step 8 -->
 
   <li>When you're ready to save, make sure you are in the root directory of your repository or the directory where the new folder you want to save is located. Then use the git add command to add the new folder and its contents to the staging area. Run the following command:<br> <b>git add folder-name</b><br> OR <br> <b>git add .</b> <br>  If you want to add all new files and folders in the current directory</li><br>
 
   <li>When you're ready to save, make sure you are in the root directory of your repository or the directory where the new folder you want to save is located. Then use the git add command to add the new folder and its contents to the staging area. Run the following command:<br> <b>git add folder-name</b><br> OR <br> <b>git add .</b> <br>  If you want to add all new files and folders in the current directory</li><br>
 +
 +
<!-- Step 9 -->
 
   <li>Once the new folder/file is added to the staging area, you can commit the changes using the git commit command:<br> <b>git commit -m "Commit message"</b> <br> Replace <i>Commit message</i> with a descriptive message summarizing the changes you made.</li><br>
 
   <li>Once the new folder/file is added to the staging area, you can commit the changes using the git commit command:<br> <b>git commit -m "Commit message"</b> <br> Replace <i>Commit message</i> with a descriptive message summarizing the changes you made.</li><br>
 +
 +
<!-- Step 10 -->
 
   <li>After committing the changes (on your local machine), you can push them to the remote repository on GitHub using the git push command:<br> <b>git push origin branch-name</b><br> Replace <i>branch-name</i> with the name of the branch you want to push to (e.g., main)<br> You will need to login with your Username and Personal Access Token</li><br>
 
   <li>After committing the changes (on your local machine), you can push them to the remote repository on GitHub using the git push command:<br> <b>git push origin branch-name</b><br> Replace <i>branch-name</i> with the name of the branch you want to push to (e.g., main)<br> You will need to login with your Username and Personal Access Token</li><br>
 
</ol>
 
</ol>
581

edits

Navigation menu