Skip to content
This repository was archived by the owner on Jul 15, 2021. It is now read-only.

Coding Standards

Jay Gandhi edited this page May 13, 2016 · 2 revisions

###USE GIT We don't just use git to make your life more complicated. It serves a really important function of allowing us to quickly and effectively manage our versions and confidently add new code and features without fear of breaking the entire site! (We can always rollback if one commit does something bad). So in order to take full advantage of the wonderfulness that is Git, here are some basic guidelines:

  • ABB (Always Be Branching):

    master is our production branch and therefore you should not be working directly on it ever. Instead make a branch off of master (git branch -b <branch_name_here>) and work there. When your code is ready to be added to the production code base, submit a pull request using github's pull request feature so that another developer can review the code and give it the A-OK to be merged in. It is also recommended to name your branches in the following manner: <your initials>-<description_of_feature/bug_fix>. This way it is easy to keep track of what branch does what (and who is the main author).

  • Commits are Friends, Not Food:

    Get in the habit of committing often and for small changes. It may seem like a hassle, but doing this allows you to not only go back to a specific change if you need to, but it also allows us to have a detailed history of all the changes done to the code base. This way if anything goes wrong in the future, we can look through the commits to see what might have caused it. We all break stuff sometimes and it helps to have a good account of where it happened.

  • "AAAAYYY LMAO/asdfasdfasdf/did stuff":

    Just as commits are super useful, so are their corresponding messages. Don't just throw in some random string or non descriptive statement into the message. Be descriptive (and concise) about what exactly this commit did. Instead of "made css changes", how about "changed nav-bar styles". I know this can be hard for larger commits (but that's why you should be committing more often!!), but doing the best you can here can really help down the road and makes our code base that much easier to maintain.

Clone this wiki locally