Skip to content

Instantly share code, notes, and snippets.

@mschneider247
Last active June 5, 2019 21:42
Show Gist options
  • Save mschneider247/bf98807a51713a97586362bc752d54ef to your computer and use it in GitHub Desktop.
Save mschneider247/bf98807a51713a97586362bc752d54ef to your computer and use it in GitHub Desktop.
Beginners Guide to Git

First some notes on markdown


Use the "#" character before lines to indicate different header types. One "#" will create a large H1 type header

Multiple "#" characters, up to 6, can be used to show smaller sub-headings, h2-h6.

  1. Numbered lists are easy
  2. Just add "1." or "2." etc to the beggining of the line to indicate its numbered place
  3. And now you have a numbered list!
  • To make a bulleted list:
  • Use either a "*", "-", or "+" at the beggining of the line
  • These characters will be formated as bullet points in the final list

To make a word or phrase bold, wrap it in double "*" . This is bold!
To make a word or phrase italic, wrap it in a single "*". This is italic!

To indicate snippets of code, wrap the desired text using a single back-tick character. This is a code snippet

Strike through text by wrapping it in double "~" . This text is crossed out

include links in your markdown by wrapping the link text in [], then using () afterwards to write out the actual web address. Here is a link to google

Create a horizontal line across the document by using three "-" characters in a row. Here comes a line!


Basic Terminal Commands:

  • pwd - Gives your current path, tells you where you are
  • mkdir - Creates a new directory, must be followed up with its name
  • ls - Lists the contents of the current directory
  • cd - Change Directory. Must give directions in and out of the directory
  • cd .. - Goes back one step to the parent directory
  • touch - creates a file, must be given a name and extension
  • echo - adds text to a file. Example$ echo "Text to add" >> sample.txt
  • cat - reads the contents of a file, must be given file name and extension

Destructive commands:

  • rm - removes a file, must be given file name and extension
  • rm-rf - remove a directory and all its files. Cannot be used on the directory you are currently in so you must give rm-rf a directory to eat.

Git is a Version Control System (VCS)

Basic Git Commands:

  • git init - Start tracking the current directory with GIT
  • git status - Checks the status of the current files being managed
  • git diff - Show changes between your commits
  • git add - Move a file you have modified over to the staging area
  • git commit - Merge the file with the master branch
  • Use Control+C or Control+D to get out of sticky situations

  • git clone - allows you to copy an existing repository and move it to your local computer. This will create a new directory, so make sure to switch out of any directories that already have Git active.
  • git remote add origin - allows you to link a local Git repository to one at GitHub
  • git push origin master - sends your modified files back to the master repository on GitHub. They wont be included in the master branch until verified by the repository's owner.

  • To add an image in markdown, use the same format as for a link, except put a ! in front of it. The text in the brackets will become the alt text.

Winking Kitten

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment