Appendix C: Just Enough Git

Register with GitHub

  • Git is one of MANY in a series of programs called Version Control Systems. Version control software (in the simplest terms) is a program to help one keep track of and organize writing program(s).
  • Since this is a JUST ENOUGH approach, I will go over enough so that you can start working and learning git on YOUR own account.

C.1 - Get Git

NOTE: If you previously loaded Anaconda Python then you already have Git installed.
Check to see if you have git.
  • Go to: Terminal shell
  • Enter: git --version
    • git version 2.7.4
Otherwise, download Git
  • Obtaining Git is easy.
git-scm.com Front Page
git-scm.com Front Page

C.2 - Set up your first Project / Repository

  1. Sign into your GitHub account.
  2. Press: Start a project
Git First Page - <press> Start a project
Git First Page - <press> Start a project
  1. On the “Create a new repository” page: Fill in…
  2. Repository name: First project
  3. Description: Add you keyowrds here,
  4. For example: test repository
  5. Initialize this repository with a README:
  6. This can be any length you need to fully describe your work to anyone “walking off the street”.
  7. Press: Create repository
Create and Describe You Repository - <press> Create repository
Create and Describe You Repository - <press> Create repository

C.3 - Cloning a repository

  1. Copy the web address of new repository,
  2. See: Red Highlighted: Clone with HTTPS
  3. Go to your Working Directory, AND
  4. Open your Linux/Mac/Windows terminal window or shell:
  5. Type: git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY
  6. Enter
Cloning a Repository
Cloning a Repository

C.4 - The 5 most useful git commands

  • Add files to your working directory as needed.
  • When you are ready to save your work to Github…
  • THEN use the commands below.
Adding new material to you GitHub account
  1. git status # You will see any files the need to added or removed here.
  2. git add * # if you have added or made changes to your files simply use * (the asterick for all files)
  3. git rm /dir/file_name.ext # to delete files use rm (remove)
  4. git commit -m “describe change” # Use QUOTES when describing your change(s).
    • At this point, you will be prompted for your Username and Password
  5. git push # This pushes your changes from your local directory (Your Computer) to GitHub.
  • This completes the addition of a file(s) to your GitHub account.

NOTE: This is the absolute minimum to get you started. As you need to use more functionality you can search for it via Google or the GitHub help site.

Git Help Page
Git Help Page