Git for Pairs

Git for Pairs


Warmup

  • What is git?
  • How does GitHub relate to git?
  • What are the steps to creating and interacting with a repo on GitHub? How is git involved?
  • What questions do you still have about Git/GitHub?

Git Commands: Save Updates

git status
git add file_name
git add -p
git commit -m “Add message”

Create and switch to new branch

git checkout -b branch_name

OR

git branch branch_name
git checkout branch_name

Interact with remote

git pull origin branch_name
git merge branch_name
git push origin branch_name

Modeling Workflow


Talk with partner

What are the commands to do the following:

  • Create a repo
  • Connect a git repo to a GitHub repo
  • Update your local git with new content
  • Update GitHub with new content
  • What steps would you take if working with a partner on a separate computer? What are the pros/cons of this work flow?
  • What is a merge conflict? How might you resolve a merge conflict?

Lesson Search Results

Showing top 10 results