- Fork the repo in Github to your account (exampleorg/examplerepo -> personal/examplerepo)
- Clone your fork of the repo
git clone git@github.com:personal/examplerepo.git
- Add the remote of the original repo as the upstream
git remote add upstream git@github.com:exampleorg/examplerepo.git
- Fetch the branches from upstream
git fetch upstream
- Checkout a local branch based on the upstream's branch
git checkout -b my-branch upstream/target-branch
- Make your changes to the branch, add the changes, and commit
git add .
git commit -m "My commit"
- Push your changes to your fork
git push origin my-branch
- Go to Github and open a pull request
- Change the base branch to the
target-branch
of the base repository
Future changes can be completed by repeating from step 4.