mirror of https://github.com/docker/docs.git
Update FAQ.md
This commit is contained in:
parent
f4de5a7dd8
commit
434466f13a
|
@ -23,31 +23,39 @@ troubleshooting problems in your code contribution.
|
|||
|
||||
## How do I set my signature {#how-do-i-set-my-signature}
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
2. Add a remote called `upstream` that points to `docker/docker`
|
||||
|
||||
$ git remote add upstream https://github.com/docker/docker.git
|
||||
```
|
||||
$ cd docker-fork
|
||||
```
|
||||
|
||||
2. Add a remote called `upstream` that points to `docker/docker`
|
||||
|
||||
```
|
||||
$ git remote add upstream https://github.com/docker/docker.git
|
||||
```
|
||||
|
||||
## How do I format my Go code
|
||||
|
||||
|
@ -89,37 +97,49 @@ leave a blank line to separate paragraphs.
|
|||
|
||||
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 3ce07bb Add a new line
|
||||
```
|
||||
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
|
||||
If you run into trouble, `git --rebase abort` removes any changes and gets you
|
||||
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
|
||||
squash 3ce07bb Add a new line
|
||||
```
|
||||
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.
|
||||
After closing the file, `git` opens your editor again to edit the commit
|
||||
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.
|
||||
|
||||
$ git push -f origin my-keen-feature
|
||||
```
|
||||
$ git push -f origin my-keen-feature
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue