Skip to content
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.

Development Guidelines

meelash edited this page Sep 17, 2012 · 4 revisions

9 Simple Rules

  1. Never (and I mean NEVER) commit changes to master branch directly. Create a separate branch for every feature, commit it to github and then send a pull-request to master when the branch is stable.
  2. Never (again, NEVER) merge your own pull-request, no matter how important the "fix" is. Usually Steve or Rakshit will review/test the code and merge the pull-request.
  3. Rebase your branch to the latest master before sending a pull-request.
  4. Don't change the version numbers in package.json unless absolutely necessary.
  5. Main Trello Board has stuff to do lined up in "To Do" list, sorted by the priority (topmost card having the highest priority). Assign a card you think you can do to yourself and move it to "Doing" list. This ensures people aren't working on the same thing.
  6. One should have no more than 3 cards in "Doing" list at a time.
  7. Once a task is complete, send a pull request and paste its URL into respective card's comment for reference.
  8. Do not move the card to "Done" list by yourself. Steve or Rakshit will do that for you after merging the pull-request.
  9. Have you got any idea about how the application can be better? Feel free to create a new card in "Ideas" list. Maybe you'll see it realized.

Style guide

  • The main goal of the style guide is to make merges painless and without the distraction of widespread formatting changes in the commit diff.
  • If you wish to make any blanket formatting changes at a file level or across the whole codebase, consult with the team for the best time to do it and do it in a separate, devoted commit. Please check if your editor automatically formats files and don't allow it to pollute your commits.
  • Indentation convention-
    • soft-tabs (spaces)
    • width: 2 spaces

Frequently Used Git Operations

  • git branch <name> - Creates a new branch with mentioned name.
  • git co <branch> - Switches the context to mentioned branch.
  • git add <files> - Stages new/modified files to be committed. This is best done with a GUI client of your choice to make sure unnecessary files aren't committed.
  • git commit [-m <message>] - Commits staged code to current branch with mentioned comment.
  • git pull [origin] [branch] - Pulls the latest code from github and tries to merge it with respective branch
  • git push [origin] [branch] - Pushes current/specified branch to github. NOTE: Never push to master directly. Use a pull request from separate branch instead
  • git rebase <branch> - Applies commits of the mentioned branch to current branch. For more information about how it works please refer to this guide.

In addition to the above, here's the list of more useful commands and cheat sheets. You can print and stick one of these above your desk for quick reference. If you are interested in more comprehensive guide, this might suit you better.