From 46bad4ec446c3d044f615b91eacc5455aa3005f8 Mon Sep 17 00:00:00 2001 From: Andre Rodrigues Date: Mon, 25 Feb 2013 22:51:43 +0000 Subject: [PATCH] Improve git steps --- guidelines.html | 128 +++++++++++++++++++++++++++--------------------- 1 file changed, 72 insertions(+), 56 deletions(-) diff --git a/guidelines.html b/guidelines.html index 0c4c070..35c161c 100644 --- a/guidelines.html +++ b/guidelines.html @@ -471,68 +471,84 @@

Contribution License Agreement (CLA)

-

Step-by-step guide

- -

Checkout the latest code

-
    +

    Step-by-step guide

    + +

    Checkout the latest code

    +

    In order to obtain the source code you need to become familiar + with Git (see http://progit.org/book/) + and Github (see http://help.github.com/) + and you need to have Git installed on your local machine. You can + obtain the source code from Github and start a contributor environment by + following the these steps on your local machine:
    +

    +
    1. Go to https://github.com/WindowsAzure/[PROJECT]
    2. -
    3. Select - - and choose your own Github account as target
    4. +
    5. Select and choose your own Github account as target
    6. Clone the repository on your local machine with the following - Git command
      - git clone https://github.com/USERNAME/PROJECT.git
      + Git command
      + git clone git@github.com:[USERNAME]/[PROJECT]
    7. -
    8. Add remote to your local repository using the following Git - commands
      - cd [PROJECT]
      -
      git remote add upstream -f https://github.com/USERNAME/PROJECT.git
      +
    9. When you clone the repository you should see, at least, 2 branches: dev and master. + dev is the branch where the team does all the day to day development while master is + the branch that is always up to date with the latest release.
      + This means, before starting any work, you should switch to the dev branch. You can do so + with the following command:
      + git checkout dev
    10. +
    +

    Create bug fixes and features
    +

    +

    You can then start to make modifications to the code in your local Git repository. + This can be done in your local dev branch or, if you prefer, in a branch out of dev. + In the simplest scenario, working directly on dev, you can commit your work + with following commands:
    +

    +
      +
    1. Add and commit your local changes
      + git commit -a
    2. -
    3. Update your local repository with the changes from the remote - repository by using the following Git commands
      - git fetch upstream/dev
      - git merge upstream/dev -
    4. -
    - -

    Fixing bugs

    -

    - You make modifications of the code in your local Git repository. - Once you are done with your implementation follow the steps below:
    -

    -
      -
    1. Change the working branch to dev with the following command
      - git checkout dev
    2. -
    3. Submit the changes to your own fork in GitHub by using the - following command
      - git submit
      -
    4. -
    5. In GitHub create new pull request by clicking on the Pull - Request button -
    6. +
    7. Push your changes from your local repository to your github fork
      + git push +
    8. +
    +

    Once your code is in your github fork, you can then submit a pull request + for the team's review. You can do so with the following commands:
    +

    +
      +
    1. In GitHub click on the Pull + Request button
    2. In the pull request select your fork as source and - WindowsAzure/[PROJECT] as destination for the request
    3. + WindowsAzure/[PROJECT] as destination for the request
    4. Write detailed message describing the changes in the pull - request
    5. -
    6. Submit the pull request for consideration by the SDK Team
    7. -
    -

    - Note: All changes and pull request should be done - in the dev branch. Changes will be integrated in the - master branch by the Core Team. -

    -

    - Please keep in mind that not all requests will be approved. - Requests are reviewed by the Core Team on a regular basis and will - be updated with the status at each review. If your request is - accepted you will receive information about the next steps and - when the request will be integrated in the main branch. If your - request is rejected you will receive information about the reasons - why it was rejected.
    -

    - -
- + request +
  • Submit the pull requst for consideration by the Core Team
  • + +

    If there are conflicts between your fork and the main project one, github + will warn you that the pull request cannot be merged. If that's the case, + you can do the following: +

    +
      +
    1. Add remote to your local repository using the following Git + commands
      + git remote add upstream -f + git@github.com:WindowsAzure/[PROJECT]
      +
    2. +
    3. Update your local repository with the changes from the remote + repository by using the following Git commands (make sure you're in + the branch you're submitting the code from)
      + git merge upstream/dev
    4. +
    5. Resolve any conflicts locally and finally do another push with the command
      + git push +
    6. +
    +

    Please keep in mind that not all requests will be approved. + Requests are reviewed by the Core Team on a regular basis and will + be updated with the status at each review. If your request is + accepted you will receive information about the next steps and + when the request will be integrated in the main branch. If your + request is rejected you will receive information about the reasons + why it was rejected.
    +

    +

    Code Reviews