-
Notifications
You must be signed in to change notification settings - Fork 314
Git Pull Request Instructions
Sean Smith edited this page Jul 24, 2019
·
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.gitConfirm 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 super-awesome-feature upstream/developNow write some code
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/developThen change pick to squash for all but 1 commit, for example:

Next run tox -e cfn-autoformat to make travis happy:
pip install tox
cd cli && tox -e cfn-autoformatTest your changes with tox
cd cli && toxCommit the changes and force push:
git commit -a --amend
git push origin [your_branch] --force