Changes

Jump to navigation Jump to search
192 bytes added ,  20:49, 5 June 2023
Line 168: Line 168:     
== <i>Ignoring Files (.gitignore)</i> ==
 
== <i>Ignoring Files (.gitignore)</i> ==
There are various reasons to not want to track/push files. Here are some and how to handle them.
+
There are various reasons to not want to track/push files. The following situation helps when you're having trouble pushing files due to them being too big (>50 MB, GitHub max) .
 
<ol>
 
<ol>
<!-- Step 1 -->
  −
===Case 1 ===
  −
Case #1 - Trouble pushing files due to being too big (>50 MB, GitHub max) <br>
   
   <li><u>Find those files</u>: <br>
 
   <li><u>Find those files</u>: <br>
 
       &ensp; - Ensure you're in the directory of interest (use <b>cd </b> command as needed) <br>
 
       &ensp; - Ensure you're in the directory of interest (use <b>cd </b> command as needed) <br>
Line 215: Line 212:  
       &ensp; - Do this for all files that require it before proceeding </li><br>
 
       &ensp; - Do this for all files that require it before proceeding </li><br>
   −
 
+
  <li><u>Add, commit, and push the .gitignore file</u>: <br>
# If you want to ignore a file that is already checked in,
+
      &ensp; - Add the gitignore file using <b>git add .gitignore </b> <br>
# you must untrack the file before you add a rule to ignore it.
+
      &ensp; - Commit the file using <b>git commit -m "Files to ignore" </b> <br>
# From your terminal, untrack the file:
+
      &ensp; - Push the commit using <b>git push origin main </b> <br>
+
      &ensp; &ensp; Now subsequent pushes will know to ignore those files or types of files </li> <br>
 
  −
 
  −
 
  −
 
  −
 
      
== <u><i>Extras</i></u> ==
 
== <u><i>Extras</i></u> ==
581

edits

Navigation menu