Changes

Jump to navigation Jump to search
826 bytes added ,  15:06, 31 May 2023
Line 75: Line 75:  
   <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  
 
   <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>
 
       the staging area. Run the following command:<br>
   <b>git add folder-name</b><br>  
+
   <b>git add folder-name</b><br>
   &ensp; OR <br>
+
      <i>&ensp;- Adds the specified file or folder</i><br>
   <b>git add .</b> <br> If you want to add all new files and folders in the current directory</li><br>
+
   &emsp; OR <br>
https://github.com/git-guides/git-add
+
   <b>git add .</b> <br>
 +
      <i>&ensp;- Adds all new files and folders in the current directory recursively, does not add higher directory information</i><br>
 +
  &emsp; OR <br>
 +
  <b>git add -A</b> <br>
 +
      <i>&ensp;- Adds all files: new, modified, and deleted files. It will include files in the current directory and in higher directories that belong to the same git repository</i><br>
 +
  &emsp; OR <br>
 +
  <b>git add -u</b> <br>
 +
      <i>&ensp;- Adds modified and deleted files only. Excludes new files. It will include files in the current directory and in higher directories that belong to the same git repository</i><br><br>
 +
  For a more detailed description of <i>git add</i> go to: https://github.com/git-guides/git-add</li><br>
    
<!-- Step 9 -->
 
<!-- 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>
 +
      <i>&ensp; - Replace <b>Commit message</b> with a descriptive message summarizing the changes you made. Keep " " around your message</i></li><br>
    
<!-- Step 10 -->
 
<!-- 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>
 +
      <i>&ensp; - Replace <b>branch-name</b> with the name of the branch you want to push to (e.g., main)<br>
 +
      <i>&ensp; - You will need to login with your Username and Personal Access Token</li><br>
 
</ol>
 
</ol>
      −
<!-- For spacing      &nbsp; OR <br>
+
<!-- For spacing:       &nbsp; OR <br>     &ensp; OR <br>    &emsp; OR <br> -->
  &ensp; OR <br>
+
<!--                      Smaller indent        to          Larger indent  -->
   &emsp; OR <br> -->
 
581

edits

Navigation menu