- Fork the main WikiEduDashboard repo
- Clone this repo on your machine
- Add the main repo as "upstream"
git remote add upstream https://github.com/WikiEducationFoundation/WikiEduDashboard.git
- Get the latest version of the project
git fetch upstream
git checkout master
git pull upstream master
- Create a new branch starting from that newly updated main branch, and link it to your GitHub fork.
git checkout -b my-new-issue
git push --set-upstream origin my-new-issue
- Make your changes, commit them, and push them to your fork
- make changes
git commit -a "your-commit-message"
- write a good commit message
git push
When there have been changes in the main repo that you want to get, the cleanest option is often to rebase your branch on top of the latest commits.
- Get the latest commits and update your local master branch
git fetch upstream
git checkout master
git pull upstream master
- Rebase your in-progress feature branch
git checkout MyInProgressFeature
git rebase master
git push -f
- Make sure there isn't any work that you care about losing
- Do a hard reset to the branch you want to restart from.
git checkout MyMessedUpBranch
git reset --hard upstream/master
- Find and copy the commit ID that you want to use
- Cherry-pick that commit
git checkout MyCleanBranch
git cherry-pick COMMIT_ID