Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »

The branch where development work takes place is the master.

Set up your Git environment (for first-time contributors):

Choose a bug:

Development cycle:

  • Update your (forked & locally cloned) repository's master branch with the golden repository's master (IMPORTANT: Your fork's master branch should not be touched with any of your development changes. It should just reflect the golden repository's master, exactly).

git checkout master

git pull upstream master

 

git checkout -b <JIRA ID>

  • Develop your code:

Error rendering macro 'excerpt-include' : No link could be created for 'Coding'.


  • Complete the development on your newly created branch. 
    • Commit changes in the updated file to your branch with a good commit messageMake your commit message relevant and concise, so that it will be helpful to you later:

      git add <updated file>

      git commit -m "<Commit message>"

Tip: Commit often, perfect later.

 

  • Push the development branch to your fork.  By convention,  'origin' points to your forked repository on GitHub:

git push origin <JIRA ID>

 

  • Repeat the above steps until you are satisfied with your code change.
  • Fetch changes made to the golden repository by other contributors.  By convention, 'upstream' points to the golden repository on GitHub:

    git fetch upstream

  • Rebase your development branch with new changes from the golden repository's master. 'upstream/master' is the remote tracking branch for the golden repository's (upstream's) master branch, on your local machine:

    git checkout <JIRA ID>

    git rebase upstream/master

  • If there are conflicts, Git will throw an error message informing you so and ask you to resolve it before continuing the rebase.
    • Resolve conflicts the same way you resolve an ordinary merge conflict in Git. Here's a way to resolve conflicts from the command line.
    • Then, just continue the rebase operation:

      git rebase --continue

    • If the conflict is complex or problematic, you can abort the current rebase operation instead of continuing, and come back to it later:

      git rebase --abort

  • After the rebase is complete, you might want to clean up your branch's commit history:
    • Squash all your commits into fewer, meaningful change commits (just one suffices if the code change is small enough).

      git checkout <JIRA ID>

      git rebase -i --fork-point master

    • Write meaningful commit messages for your commits while doing the squash above. You can also use git commit --amend or rebase if you'd rather do it later.

  • Finally, push the polished branch to your fork. Because you did a git rebase, you'll need to do a force push.

    git push -f origin <JIRA ID>

  • Look at the checklist for developing code.
  • Your code changes are good to go! Go ahead and create a pull request.

 

  • Your changes are now ready to be reviewed.

Review and check-in:

Error rendering macro 'excerpt-include' : No link could be created for 'Review Cycle'.

Cleanup:

  • Housekeeping: we strongly recommend that you delete the development branch from your forked and cloned repos now.

    git checkout master

    git push origin --delete <JIRA ID> (deletes <JIRA ID> from the fork)

    git branch -D <JIRA ID> (deletes <JIRA ID> from local clone)

  • Update your bug.


 

 

  • No labels