Some rework markup and branch-fu

This commit is contained in:
Andrew Chilton 2014-05-16 15:37:11 +12:00
Родитель dd62e8c46f
Коммит 97b2ea7346
1 изменённых файлов: 20 добавлений и 34 удалений

Просмотреть файл

@ -4,7 +4,7 @@ Anyone is welcome to help with Firefox Accounts. Feel free to get in touch with
mailing list or through issues here on GitHub.
* IRC: `#fxa` on `irc.mozilla.org`
* Mailing list: [https://mail.mozilla.org/listinfo/dev-fxacct](https://mail.mozilla.org/listinfo/dev-fxacct)
* Mailing list: <https://mail.mozilla.org/listinfo/dev-fxacct>
* and of course, [the issues list](https://github.com/mozilla/fxa-auth-server/issues)
## Bug Reports ##
@ -28,54 +28,40 @@ See the main `README.md` for information on prerequisites, installing, running a
## Example Workflow ##
This is an example workflow to make it easier to submit Pull Requests.
This is an example workflow to make it easier to submit Pull Requests. Imagine your username is `user1`:
1) Fork this repository via the GitHub interface
2) Clone your copy locally:
2) The clone the upstream (as origin) and add your own repo as a remote:
```
$ git clone git@github.com:<username>/fxa-auth-server.git
$ cd fxa-auth-server
```
$ git clone https://github.com/mozilla/fxa-auth-server.git
$ cd fxa-auth-server
$ git remote add user1 git@github.com:user1/fxa-auth-server.git
3) Add this repo as upstream:
3) Create a branch for your fix/feature and make sure it's your currently checked-out branch:
```
$ git remote add upstream https://github.com/mozilla/fxa-auth-server.git
```
$ git checkout -b add-new-feature
4) Create a branch for your fix/feature:
4) Add/fix code, add tests then commit and push this branch to your repo:
```
$ git branch add-new-feature
```
5) Add/fix code, add tests then commit and push this branch to your repo:
```
$ git add <files...>
$ git commit -m '<your message>'
$ git push origin add-new-feature
```
$ git add <files...>
$ git commit
$ git push user1 add-new-feature
6) From the GitHub interface for your repo, click the `Review Changes and Pull Request` which appears next to your new branch.
7) Click `Send pull request`.
### Keeping up to Date ###
The main reason for creating a new branch for each feature or fix is so that you can track master correctly. If you need
to fetch the latest code for a new fix, try the following once on your master branch:
to fetch the latest code for a new fix, try the following:
```
$ git checkout master
$ git fetch upstream
$ git rebase origin/master
```
$ git checkout master
$ git pull
And keep your own GitHub master up to date:
And (optionally) keep your own GitHub master up to date:
```
$ git push origin master
```
$ git push user1 master
And now you're ready to branch again for your new feature (from step 4 above).
Now you're ready to branch again for your new feature (from step 4 above).