An Intro to Git and GitHub for Beginners (Tutorial)

Step 0: Install git and create a GitHub account

Git and GitHub

Step 1: Create a local git repository

Step 2: Add a new file to the repo

An interlude: The staging environment, the commit, and you

Step 3: Add a file to the staging environment

Step 4: Create a commit

Step 5: Create a new branch

A note on branch names

Step 6: Create a new repository on GitHub

Step 7: Push a branch to GitHub

Step 8: Create a pull request (PR)

Step 9: Merge a PR

Step 10: Get changes on GitHub back to your computer

Step 11: Bask in your git glory

  • https://training.github.com/
    Github’s official git cheat sheets! Handy for remembering the everyday commands you’ll use.
  • https://learngitbranching.js.org/
    Confused or intrigued by git’s branch system? That just means you’re human! It’s one of the deepest parts of git, but also arguably the most powerful. Understanding the branch model gives you git superpowers, and this tutorial gives you a way to learn git branches in a visual, intuitive way.
  • https://git-school.github.io/visualizing-git
    Another tool for exploring git visually. This one is more of an open-ended sandbox than learngitbranching.js.org
  • https://github.com/jlord/git-it-electron
    A desktop application that helps you learn git through challenges you have to solve. It has a series of levels, each requiring you to use git commands to arrive at a correct answer.
  • https://github.com/Gazler/githug
    If you liked git-it, Githug is another puzzle-based tutorial designed to give you a practical way of learning git.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store