npm i
npm run dev
-
Make a new branch, where
<BRANCHNAME>
is:feature/
,bugfix/
orchore/
and then what its aboutgit checkout -b <BRANCHNAME>
example:git checkout -b feature/add-home-page
-
Save work locally
git add .
orgit add <FILE>
git commit -m "<MESSAGE>"
-
Ensure you're on the correct branch
git status
orgit branch
-
Push changes
git push
-
Create a Pull Request (PR) by coming to this repo in github, finding your branch, and pressing the PR button
In the case of a merge conflict (seen in the PR), it's time to rebase. DO NOT MERGE
-
If local changes haven't been saved stash them
git stash save
-
Navigate to the main branch and update your local version to the latest version
git checkout main
git pull
-
Navigate back to your branch
git checkout <BRANCHNAME>
-
Rebase
- start:
git rebase main
- check editor for conflicts and choose which version, or a combination of both is correct
- add changes:
git add .
- continue to next step:
git rebase --continue
- repeat last two steps until rebase is done, commit not necessary here
- if work stashed(step 1):
git stash pop
, fix conflicts like before, add them and commit - push up rebased branch:
git push --force
(--force
flag used here because we reordered history on purpose)