Git Branch Management and Review Process

Published On: 28 January 2017.By .
  • General

How to Use Pull Request on Git

 

Creating the project on git is really so effective for debug, cloning, recovering etc. There are various methods to manage the project with git and reviewing the code for publishing the release build. Even  git approaches helps to the testing team and quality assurance team to ensure the best qualities for project flow and its features.

Here the steps will describe how to use pull request on git.

  • Step 1 Setup project with git

Create the new project configure it VCS option. Click on option ‘Enable Version control integration’ and select the project root as git.Each and every step can easily be done with the use of proper commands.

The same process can be achieved using command line too.

For Android : Create the new project into Android Studio and configure it VCS option. Click on option ‘Enable Version control integration’ and select the project root as git.

The same process can be achieved using command line too.

  • Step 2:  Branch Creation and Settings

Create the branches as master and staging(or development) or next processing of Project.so that code can be pushed into their respective branches according to requirement and its version. Configure the settings into git corresponding to Access Management and Branch permission options.

For staging(or development) branch and master branch,write permission should only be given to admin / owner user.

With these settings, we can enable different users with different permission like read, write, admin for the different branches.

Even Default reviewers also can be set with settings options too.

We can easily add reviewers and remove reviewers from the list according to requirements and purposes.It’s a good suggestion that for every project at least 2 reviewers should be added.

  • Step 3. Configure Tools

Jenking,trello,Jira toll can also be configured for testing and quality assurance of our  project within the git.

  • Stept 4.  Branch Management

Next step is to create new branches for features, hotfix,feedback,issues and branch naming convention will be as follows

eg: features/featureName  for features development , hotfix/hotfixName for hotfix development ,

feedback/feedbackName for feedback development, issues/issueName or issues/jiraTicketNo. For issues development.

Let’s suppose for Login features the branch name will be features/login, for Report Analysis feature the branch name will be like features/reportAnalysis , For Multiple Filter Issue the branch name will be issue/multiple filter etc.

Every time when new branch is created  for working or development, it should be pulled from development branch.

  • Step 5. Pull Request Management

Pull Request can be easily created using git interface. While creating pull request user can easily select the branch for which he/she wants to create the pull request for review and user can also select from which branch the pull request should be generated. Generally pull request are created from staging(or development) branch destination branch after approval.Generally destination branch are development  or staging. Even we can select other source branch or other destination branch according to requirements.

Based on Pull Request, the reviewers are allowed to review the code, comments and approve too.This process is used to make the optimized code and debug it with code analysis process, which is really very efficient for big projects or with big team size

  • Step 6: Testing and Code Review

Based on Module , first developer will review the functionality and test it properly.if he/she finds everything according to flow then testing team will approve the functionality of the same module. If testing team find the same flow, then pull request will be generated for review process.

After successful review of code and approval , the branches code can be merged with development/staging branch for next processing.the module branches will be automatically deleted from the branch list.

Eg: like for the branch features/login,  first developer will develop the code for it, then test it, after testing the QA team will test the same branch code with running stage, after approval of testing team, the code review team will review the code for more optimization and better performance and would give their suggestions for the same.

After each approval, the branch will be merged into staging branch for next  processing / development.after merging the features/login into staging, the login module branch will be automatically deleted.

 

 

Related content

That’s all for this blog

Go to Top