Submitting Code



This guide will provide a walkthrough for code submission through Bitbucket


Introduction

Now that an Issue has been created, and code has been written in a Development branch, it's time to submit your code back to Bitbucket.



Committing and Pushing

Once the code changes have been completed and tested in the local environment; a GIT commit must be created. This is easily done using the git commit command through the command line, or using an IDE such as Eclipse or a GIT client such as SourceTree. Make sure only the files and changes which are relevant to the documented issue are submitted. This can be done through the use of git status and  git add/remove.








*Note: You won't normally need the --set-upstream argument unless you created the branch from the command line instead of through JIRA or Bitbucket.


You can now view your commit through the Bitbucket interface.



Creating a Pull Request

A pull request signals you would like your commit merged into an official branch such as master or stable. A pull request can contain many commits. You can create a pull request in JIRA or Bitbucket to begin the code review process.



Creating a pull request is easy and only requires a few fields

  1. The source branch (the Feature branch where your code is)
  2. The destination branch (stable or master)
  3. Description information
  4. Reviewers
  5. Close branch flag