| 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> |
| |   - Ensure you're in the directory of interest (use <b>cd </b> command as needed) <br> | |   - Ensure you're in the directory of interest (use <b>cd </b> command as needed) <br> |
| Line 215: |
Line 212: |
| |   - Do this for all files that require it before proceeding </li><br> | |   - 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,
| + |   - Add the gitignore file using <b>git add .gitignore </b> <br> |
| − | # you must untrack the file before you add a rule to ignore it.
| + |   - Commit the file using <b>git commit -m "Files to ignore" </b> <br> |
| − | # From your terminal, untrack the file:
| + |   - Push the commit using <b>git push origin main </b> <br> |
| − | #
| + |     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> == |