[nvda-addons] Re: Add-on code management: branches for major features

  • From: Mesar Hameed <mesar.hameed@xxxxxxxxx>
  • To: nvda-addons@xxxxxxxxxxxxx
  • Date: Mon, 20 May 2013 10:30:04 +0200

For those that are new to git, we can manage this for you while you get
your feet wet.
Please dont forget to commit regularly.

thanks, 
Mesar
On Mon 20/05/13,00:59, Joseph Lee wrote:
> Hi,
> Just had a discussion with Mesar about code management. I asked him if
> it is preferable to use branches for coding major features, and he
> said yes. So, we would like to recommend: if you're working on a major
> feature (whether adding a new feature or modifying an existing one),
> try using branches (other than master), as it helps with merge and
> code review process (via pull request) and to find bugs easily (if a
> bug exists with some code, chances are that it might be related to a
> feature).
> To do this:
> If using a command line (Cygwin, from Linux terminal and what not):
> 1. Navigate to the repo folder for your add-on.
> 2. Do "git branch" to show current branches (the one marked with an
> asterisk is the active one).
> 3. Checkout the branch from which you wish to work on the feature
> (likely master).
> 4. Then do:
> git checkout -b newbranchname
> Where newbranchname is a brief summary of the feature you plan to work
> on e.g. lookupRefactor, newMessages, newAppSupport, etc. If it works,
> Git will say, "switched to branchname."
> 5. Work on the code, then once you've reached some milestone, do git
> push origin branchname.
> 6. Once code review is done or when you know the feature is stable,
> merge it back to master branch by doing: git checkout master; git
> merge branchname.
> 
> If using GUI (example comes from Tortoise Git):
> 1. Select the repo folder.
> 2. Open context menu, go to Tortoise Git, then select Create branch.
> 3. Name your branch (using the command line style), then from the
> branch list, select the base branch for this new branch.
> 4. Go to Tortoise Git, then select Switch.
> 5. Work on your code. When finished, go to Tortoise Git, then choose
> push. In the branch list, select origin.
> 6. Once done, switch back to master and go to Tortoise Git/Merge.
> I hope the GUI steps were right...
> 
> Thanks.
> Cheers,
> Joseph
> ----------------------------------------------------------------
> 
> NVDA add-ons Central: A list for discussing NVDA add-ons
> 
> To post a message, send an email to nvda-addons@xxxxxxxxxxxxx.
> 
> To unsubscribe, send an email with the subject line of "unsubscribe" (without 
> quotes) to nvda-addons-request@xxxxxxxxxxxxx.
> 
> If you have questions for list moderators, please send a message to 
> nvda-addons-moderators@xxxxxxxxxxxxx.
> 
----------------------------------------------------------------

NVDA add-ons Central: A list for discussing NVDA add-ons

To post a message, send an email to nvda-addons@xxxxxxxxxxxxx.

To unsubscribe, send an email with the subject line of "unsubscribe" (without 
quotes) to nvda-addons-request@xxxxxxxxxxxxx.

If you have questions for list moderators, please send a message to 
nvda-addons-moderators@xxxxxxxxxxxxx.

Other related posts: