Hi Madhan,
I have been using the rbt command to send code for review, I then download
the patch using the rbt tool and attach that patch to the Jira; this
seemed natural as the patch code is then the same as what is reviewed in
the rbt tool. I am interested how this approach might be causing issues, I
suggest it would be helpful for people who are new to Git (like me) if you
could mention your thinking as to why your approach is preferable.
I guess, when you come to update the patch, if the latest code has
affected the files in the first patch, you will need to pull, then merge
prior to the rebase. Is this obvious or do you want to spell this out? It
seems to me if we are going to document recommended ways of using git
commands, then we need to consider this scenario,
many thanks, David.
From: Madhan Neethiraj <[email protected]>
To: "[email protected]" <[email protected]>
Date: 27/01/2017 00:57
Subject: Guidelines to create patch for review
Atlas team,
I would request you to consider creating patches with the following steps.
It will save reviewers and committers considerable time in dealing with
patch apply/revert, adding the commit message and author info etc.
Initial patch for a review:
1. git add <files to be included in the patch>
2. git commit -m “ATLAS-1234: commit message that will go into git”
3. git format-patch origin/master
4. rename the file to: ATLAS-1234.patch
5. Attach ATLAS-1234.patch to the JIRA and create a review in review
board.
Subsequent updates for the same review:
1. git add <files to be updated in the patch>
2. git commit -m “updated”
3. merge this commit with earlier one:
- git rebase -i
- a file should open up in your text editor. Change the first word in
the second line - from “pick” to “s”
- another file should open up in your text editor. Remove the lines
for the second commit message.
4. git format-patch origin/master
5. rename the file to: ATLAS-1234-1.patch
6. Attach ATLAS-1234.patch to the JIRA and create a review in review
board.
Thanks,
Madhan
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU