[QA] Fwd:

jagori samajdar jagori79 at gmail.com
Thu Mar 27 12:37:49 UTC 2014


Hi All,



This Tuesday I had another session with Zeljko which was more on the usage
of Git and Gerrit.

Please find below the details:

   - Before submitting any changes, make sure you first sync the local
   repository with master by the command:

           *git pull origin master*

   - Create a branch at your local repo. If it's a bug you are working on:
   You might want to create a branch as Bug12345

         *git branch branchname*

   - Switch to the new branch

           *git checkout branchname*

   - Make changes to code on local repository in your branch. Create a new
   file or delete files. Try to commit all in a single patch.

               For adding a new file :

            *git add filename*

   - Finally commit the changes by:

           *commit -m "Commit Message"*

  Guidelines on how to write a good commit message can be found here:
http://www.mediawiki.org/wiki/Gerrit/Commit_message_guidelines

   - Finally to push the  code

         * git review*

   - If you wish to redo your changes:

           steps to be followed  are:

           *git review -d changenumber*

         (d option means download)

         change number can be obtained:
https://gerrit.wikimedia.org/r/#changenumber

   - Make the changes and do

            git add

           (If required)


   - Finally commit :

git commit --amend

Every time you amend your commit and submit it for review, a new patch set
is created


   -  After submitting a patch it's very important to have a code review
   done.

We need to add a reviewer from gerrit tool.

    - 'Jenkins-bot' is the auto reviewer which auto verifies the code
      submitted for initial level checks and sees whether build passes Jenkins
      test.
      - We have to manually add someone as reviewer in addition to our code
      being checked by Jenkins bot. A gerrit code reviewer can rate our code
      submitted as -2,-1,0,+1,+2.  -1 means code needs some minor work to
      be done,+2 means approved. A code reviewer can also abandon the changes.

  I am hoping to learn more on the usage of Git as I keep using it more.
  Thanks Zeljko for your guidance. Please do add to this if there are any
errors here or if I have missed on something.

Regards,
Jagori
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wikimedia.org/pipermail/qa/attachments/20140327/e49cd6de/attachment.html>


More information about the QA mailing list