Skip to content

Instantly share code, notes, and snippets.

@hilarylewis92
Forked from martensonbj/github-roadshow.md
Created September 2, 2016 16:16
Show Gist options
  • Save hilarylewis92/aca22dc82abeb58fbe69a8bc7850ab69 to your computer and use it in GitHub Desktop.
Save hilarylewis92/aca22dc82abeb58fbe69a8bc7850ab69 to your computer and use it in GitHub Desktop.
A quick rundown of what we Jhun and I will cover at the Github Roashow

Github RoadShow

Version 1: Create a new Project on Github.com

Local project is automatically connected!

Version 2: Create a new project locally

git remote add origin git@github.com:you/my-awesome-project-name.git

Next Steps: Collaborate!

How to hook up a project with collaborators.

Branching

  • Important Rules:
    1. Anything on Master is deployable/Something you want to get paid for.
    2. Start branch names with your initials (suggestion, personal preference)

Pull Requests

  • When to Make One:

    1. When you need feedback/help
    2. When you want to share ideas/bits of code with your group
    3. When you want to merge changes into master
  • Use @mention!

  • Fork & Pull vs Shared Repo & Pull

Pull Request Key Words

  • Closes #10 will close issue #10 in your issues log (or Waffle card!)
  • Closing Issues in Github
  • Add notes on specific code by adding specific line numbers
    • Click on "Files changed" and click on specific line to add a comment.

Fixing Things

  • git ammend
  • git revert <Commit SHA>
    • Creates a new commit that undoes the changes from a previous commit.
    • This command adds new history to the project (it doesn't modify existing history).
  • git reset <Last Good Commit SHA>
    • It modifies the index (the so-called "staging area").
    • Or it changes which commit a branch head is currently pointing at.
    • This command may alter existing history (by changing the commit that a branch references).
    • *Preserves the working directory. commits = gone. contents = still on disk
  • git reset --hard <Last Good Commit SHA>
    • When you want to undo BOTH commits and the changes in one karate chop)
    • Removes EVERYTHING between now and the commit you specify.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment