Add more old per-project docs to our general git usage

This commit is contained in:
benjamin melançon 2023-04-21 18:32:29 -04:00
parent f75fba468c
commit 9ce108b525

View file

@ -1,4 +1,24 @@
# Git Usage
# Git usage
## Getting in sync with other developers
To bring in changes from other developers into the branch you are
working on, from main `git pull` and then `git checkout your-branch-name` and `git rebase main`
## Git troubleshooting
If you've accidentally made commits to main and cannot pull in other's changes as a result.
To get rid of a commit (the most recent one),
```
git reset HEAD^
```
to then be able to `git stash` changes from the commit, now local changes. To just throw everything in the commit away, `git reset --hard HEAD^`
See https://sethrobertson.github.io/GitFixUm/fixup.html
## When NOT to manually resolve merge conflicts