-
Notifications
You must be signed in to change notification settings - Fork 312
Git Pull Request Instructions
Enrico Usai edited this page May 24, 2022
·
4 revisions
First configure your remotes so that origin
-> your fork and upstream
-> main package:
$ git remote add upstream https://github.com/aws/aws-parallelcluster.git
Confirm they are setup properly:
$ git remote -vv
origin https://github.com/sean-smith/aws-parallelcluster.git (fetch)
origin https://github.com/sean-smith/aws-parallelcluster.git (push)
upstream https://github.com/aws/aws-parallelcluster.git (fetch)
upstream https://github.com/aws/aws-parallelcluster.git (push)
The first step before coding is to create a branch, it's helpful to branch off upstream/develop
so git will tell you when the branch is out of sync.
$ git checkout -b wip/super-awesome-feature upstream/develop
Now write some code and unit tests
Squash all the commits into one commit. Each feature should be one commit.
Then you can rebase & squash:
git fetch upstream && git rebase upstream/develop
git rebase -i upstream/develop
Then change pick
to squash
for all but 1 commit, for example:
Next run tox -e autoformat
to make travis happy:
pip install tox
cd cli && tox -e autoformat
Test your changes with tox
cd cli && tox
Commit the changes and force push:
git commit -a --amend
git push origin [your_branch] --force