Update FAQ.md

This commit is contained in:
John Mulhausen 2016-10-25 11:36:21 -07:00 committed by GitHub
parent f4de5a7dd8
commit 434466f13a
1 changed files with 50 additions and 30 deletions

View File

@ -25,15 +25,21 @@ troubleshooting problems in your code contribution.
1. Change to the root of your `docker-fork` repository. 1. Change to the root of your `docker-fork` repository.
```
$ cd docker-fork $ cd docker-fork
```
2. Set your `user.name` for the repository. 2. Set your `user.name` for the repository.
```
$ git config --local user.name "FirstName LastName" $ git config --local user.name "FirstName LastName"
```
3. Set your `user.email` for the repository. 3. Set your `user.email` for the repository.
```
$ git config --local user.email "emailname@mycompany.com" $ git config --local user.email "emailname@mycompany.com"
```
## How do I track changes from the docker repo upstream ## How do I track changes from the docker repo upstream
@ -41,13 +47,15 @@ Set your local repo to track changes upstream, on the `docker` repository.
1. Change to the root of your Docker repository. 1. Change to the root of your Docker repository.
```
$ cd docker-fork $ cd docker-fork
```
2. Add a remote called `upstream` that points to `docker/docker` 2. Add a remote called `upstream` that points to `docker/docker`
```
$ git remote add upstream https://github.com/docker/docker.git $ git remote add upstream https://github.com/docker/docker.git
```
## How do I format my Go code ## How do I format my Go code
@ -91,35 +99,47 @@ Always rebase and squash your commits before making a pull request.
1. Fetch any of the last minute changes from `docker/docker`. 1. Fetch any of the last minute changes from `docker/docker`.
```
$ git fetch upstream master $ git fetch upstream master
```
3. Start an interactive rebase. 3. Start an interactive rebase.
```
$ git rebase -i upstream/master $ git rebase -i upstream/master
```
4. Rebase opens an editor with a list of commits. 4. Rebase opens an editor with a list of commits.
```
pick 1a79f55 Tweak some of images pick 1a79f55 Tweak some of images
pick 3ce07bb Add a new line pick 3ce07bb Add a new line
```
If you run into trouble, `git --rebase abort` removes any changes and gets you If you run into trouble, `git --rebase abort` removes any changes and gets you
back to where you started. back to where you started.
4. Squash the `pick` keyword with `squash` on all but the first commit. 4. Squash the `pick` keyword with `squash` on all but the first commit.
```
pick 1a79f55 Tweak some of images pick 1a79f55 Tweak some of images
squash 3ce07bb Add a new line squash 3ce07bb Add a new line
````
After closing the file, `git` opens your editor again to edit the commit After closing the file, `git` opens your editor again to edit the commit
message. message.
5. Edit and save your commit message. 5. Edit and save your commit message.
```
$ git commit -s $ git commit -s
```
Make sure your message includes your signature. Make sure your message includes your signature.
8. Push any changes to your fork on GitHub, using the `-f` option to 8. Push any changes to your fork on GitHub, using the `-f` option to
force the previous change to be overwritten. force the previous change to be overwritten.
```
$ git push -f origin my-keen-feature $ git push -f origin my-keen-feature
```