(If you know how to git branch and/or are familiar with git already, feel free to ignore these steps and work on your own branch or otherwise.)
- Don't use
git [COMMAND] --forceto force any commands. - Don't use
git add *unless you know what you're doing.- If you're not using
.gitignore, you probably don't know what you're doing. - In fact, avoid using
*in general unless you know what you're doing.
- If you're not using
- Use
git fetchthengit statusto check the status of your local repository.- If you are behind
master, attempt togit pullto update your local repository. If conflicts arise because of this, message in the group chat.
- If you are behind
- Use
git add [FILEPATH]to add any new or modified files you wish to upload.- If you make a mistake and want to remove a file from the commit, use
git reset [FILEPATH]to unstage the file.- Alternatively, you can use
git restore --staged [FILEPATH]for the same effect
- Alternatively, you can use
- If you make a mistake and want to remove a file from the commit, use
- Use
git commit -m "message"with an appropriate short description of the commit in quotes.- If you make a commit and want to undo the commit, you can use
git resetwithoout specifying a file to undo the commit.
- If you make a commit and want to undo the commit, you can use
- Finally, use
git pushto upload your files to the GitHub repository.
- If you want to delete a file from the online repository (untrack the file) without deleting it locally, you can use
git rm [FILEPATH]to do so.