Skip to content

Latest commit

Β 

History

History
45 lines (39 loc) Β· 1.61 KB

File metadata and controls

45 lines (39 loc) Β· 1.61 KB

Why Learn git?

  • version control
  • πŸ‘­ promotes collaboration
  • 🏭 industry standard
  • 🌎 language inlusive
  • πŸ›  interfaces with other tools (testing and deployment platforms)
  • πŸ’Έ free (and open source)

Common Terms:

  • git / Github: Github: github.com (ie a hosting service). Git is a tool/system for version control management.
  • repository (repo): directory or group of files
  • local / remote: the copy of code on your machine vs the copy that is hosted
  • pull request (pr): a request to merge changes into a different branch
  • diff: the changes made from one version compared to another
  • master: default branch
  • branch: a copy of the repository which you can diff against the master branch
  • fork / clone Cloning is still connected to the original remote. Forking makes a copy so a full copy of the repo with a new master branch is saved under your username.

Basic Commands

  • git clone <repo>
  • git checkout -b <branch_name>
  • git branch
  • git status
  • git diff
  • git add
  • git commit -m 'useful message about the commit'
  • git push origin <branch name>

Workflows & Tips

  • 🌴 always work on a branch
  • make PRs
  • πŸ•΅οΈβ€β™€οΈ how to troubleshoot: 1. ask colleagues/collaborators 2. google it
  • get reviews
  • πŸ“– make a useful readme and keep it updated
  • thoughtfully bundle your commits πŸ€”
  • add useful commit messages, even for 'insignificant' changes
  • commit often

Command Line vs Desktop Tool

  • demonstration

Practice and Questions πŸ™‹

  • πŸ‘― Try cloning or forking my repo
  • Can you find and correct my typo(s) πŸ€¦β€β™‚οΈ