diff --git a/how-to-commit.md b/how-to-commit.md index 629c39d..524208c 100644 --- a/how-to-commit.md +++ b/how-to-commit.md @@ -10,4 +10,16 @@ 8. `git commit -m "message"` to describe the changes you’ve made 9. `git push` to take your local changes and push them up to github -**Tip:** To open the folder you're in within your terminak in VS Code with the `code.`, go into VS Code, run `SHIFT + COMMAND + P` and then type in `SHELL COMMAND: Install 'code' command in Path` \ No newline at end of file +**Tip:** To open the folder you're in within your terminak in VS Code with the `code.`, go into VS Code, run `SHIFT + COMMAND + P` and then type in `SHELL COMMAND: Install 'code' command in Path` + +### Tips + +- Make sure to `git pull` before you make any new changes. If you don't `git pull` and there end up being remote changes that you don't have locally, you may get a merge conflict. + +If there's a merge conflict, the following command will get all the changes without overriding your own change (force merging remote into local while preserving your changes): + +`git pull` +`hit the escape key` +`:wq` + +If you ever want to "force git pull" and scrap anything you have locally and reset to the master branch, you can run: `git reset --hard origin/master` \ No newline at end of file