Skip to content
Anissa Jones edited this page May 26, 2017 · 2 revisions

Git is a bit different when you are working with teams. This guide will hopefully help with the main scenarios.

Tools:

  1. Git official docs
    • When in doubt the official documentation should be your friend.
  2. Oh shit, git!
    • Excuse the language of the site, but these tips are great for solving errors.
  3. Gits
    • A good way to get credit on Github for 2 users work while pair programming using one computer.
  4. Git commit style guide
    • It's always nice for people to follow the same style, so it's quicker to see things when something goes wrong.
  5. Youtube
  6. Github How To.

Forking and Pushing

In order to get the full open source experience, don't clone master. Instead:

  1. Fork the master repo.
  2. Now you have the repo, so clone your own repo.
$ git clone [email protected]:YourUserName/YourProjectName.git
  1. Create a new branch
$ git checkout -b my_new_branch
  1. Code like a maniac, then:
$ git add .
$ git commit -m "My awesome code"
  1. The original master might have changed so
$ git checkout master
$ git fetch upstream
$ git checkout your_branch_name
$ git rebase upstream/master
  1. Chances are you will have merge conflicts. What a great time to learn how to fix those huh?

Merge Conflicts:

  • Atom has a nice visual merge plugin
  • If you are a lead, Wes Bos explains how to do it from github. NOTE: this is a Work In Progress and steps need to be added.