We are happy to accept contributions to our Birthday party site. Read this page if you want to contribute or to publish the site.
- Get set up
- Set your signature and an upstream remote
- Make changes on a feature branch
- Rebase your branch
- Create a pull request
Before you begin, install Hugo; this allows you to test your changes locally. Then:
-
Fork this repository.
Use the Fork button this page.
-
Copy your fork's clone URL from GitHub.
GitHub allows you to use HTTPS or SSH protocols for clones. You can use the
git
command line or clients like Subversion to clone a repository. These
instructions assume you are using the HTTPS protocol and the git
command
line.
-
Clone the fork to your local machine.
git clone https://github.com/moxiegirl/birthdaysite.git
When you contribute to Docker, you must certify you agree with the
Developer Certificate of Origin.
You indicate your agreement by signing your git
commits like this:
Signed-off-by: Pat Smith <[email protected]>
To create a signature, you configure your username and email address in Git.
You can set these globally or locally on just your birthdaysite
repository.
You must sign with your real name. We don't accept anonymous contributions or
contributions through pseudonyms.
As you change code in your fork, you'll want to keep it in sync with the changes
others make in the docker/birthdaysite
repository. To make syncing easier, you'll
also add a remote called upstream
that points to docker/birthdaysite
. A remote
is just another a project version hosted on the internet or network.
To configure your username, email, and add a remote:
-
Change to the root of your
birthdaysite
repository.$ cd birthdaysite
-
Set your
user.name
for the repository.$ git config --local user.name "FirstName LastName"
-
Set your
user.email
for the repository.$ git config --local user.email "[email protected]"
-
Set your local repo to track changes upstream, on the
docker
repository.$ git remote add upstream https://github.com/docker/birthdaysite.git
-
Check the result in your
git
configuration.$ git config --local -l
To list just the remotes use:
$ git remote -v
-
Change to the root of your local fork.
-
Create a feature branch.
$ git checkout -b my-keen-feature
-
Start Hugo so you can see your changes as you work.
To do this, you run Hugo locally. From the root of your local repo:
$ hugo server -w
-
Begin making changes in your feature branch.
-
When you are done, check the status of your branch.
$ git status
-
Add your changes file with
git add
command. -
Sign and commit your change.
$ git commit -s -m "Adding some super changes."
Commit messages should have a short summary sentence of no more than 50 characters. Optionally, you can also include a more detailed explanation after the summary. Separate the summary from any explanation with an empty line.
-
Push your changes to GitHub.
$ git push --set-upstream origin my-keen-feature Username for 'https://github.com': moxiegirl Password for 'https://[email protected]':
Git prompts you for your GitHub username and password. Then, the command returns a result.
-
Open your browser to Github.
-
Navigate to your
birthdaysite
fork. -
Make sure the
my-keen-feature
branch exists, that it has your commit, and the commit is signed.
Always rebase and squash your commits before making a pull request.
-
Fetch any of the last minute changes from
docker/birthdaysite
.$ git fetch upstream master
-
Start an interactive rebase.
$ git rebase -i upstream/master
-
Rebase opens an editor with a list of commits.
pick 1a79f55 Tweak some of images pick 3ce07bb Add a new line
If you run into trouble, git --rebase abort
removes any changes and gets you
back to where you started.
-
Squash the
pick
keyword withsquash
on all but the first commit.pick 1a79f55 Tweak some of images squash 3ce07bb Add a new line
After closing the file,
git
opens your editor again to edit the commit message. -
Edit and save your commit message.
git commit -s
Make sure your message includes your signature.
-
Push any changes to your fork on GitHub.
$ git push origin my-keen-feature
-
Open your browser to your fork on GitHub.
You should see the latest activity from your branch.
-
Click "Compare & pull request."
The system displays the pull request dialog. The pull request compares your changes to the
master
branch on thedocker/birthdaysite
repository. -
Edit the dialog's description and add a reference to the issue you are fixing.
GitHub helps you out by searching for the issue as you type.
-
Scroll down and verify the PR contains the commits and changes you expect.
For example, is the file count correct? Are the changes in the files what you expect.
-
Press "Create pull request".
The system creates the request and opens it for you in the
docker/birthdaysite
repository. -
Participate in the PR review.
This is for site owners:
-
Get the keys from @spf13 or @moxiegirl or Jess.
-
Make and push master.
$ AWS_S3_BUCKET=docker.party AWS_ACCESS_KEY="AKI....7Q5A" AWS_SECRET_KEY="w1Gq...LHb67..Xy3Mi" make