Skip to content

Git Workflow

Kunj Dedhia edited this page Oct 12, 2019 · 1 revision

Many of you know how git works, but to reiterate the main points

  1. DO NOT commit and push directly on master. We will be using the dev branch for development. Create a pull request and wait for approval
  2. Create a new a branch for every edit you make, you do not need to create a new branch for every story you work on.
  3. Commit messages should not be arbitrary. Please provide a short description of each edit and if the commit closes an issue, provide a github issue reference keyword such as "fixes #1" or "resolve #21".

For people who are completely new to git, refer to this tutorial for help when needed. Basically we're all changing code on a cloud, which syncs with the code on your machine great commands are,

git pull - Grabs the most current versions of the code to your local machine (merge conflicts arrises)

git branch branch_name - creates a new branch with the name branch_name. Use this to work on your own version of the code

git checkout branch_name - use this to switch the branch you are working on to branch_name

git status - Shows what branch you're on and what files you've changed. Also shows what files are staged

git add file_name - stages the file_name to be added with a commit

git commit -m "commit message goes here" - commits staged files to your local repository

git push - pushes your changes to the local repository to the remote repo. (pretty hard to undo)

Any questions slack the tech lead, Kunj Dedhia

Clone this wiki locally