Skip to content

Instantly share code, notes, and snippets.

@peterbsmyth
Last active September 18, 2018 22:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save peterbsmyth/9a778813fe922d6bf0d7a15e933b6d58 to your computer and use it in GitHub Desktop.
Save peterbsmyth/9a778813fe922d6bf0d7a15e933b6d58 to your computer and use it in GitHub Desktop.
Starter Commands

Getting Started

To get a repository from github

git clone https://github.com/peterbsmith2/syacuse-ninja-barracks

Making a new design

To make a new branch

git checkout -b <NEW_BRANCH_NAME>

Generic

To save code

# 1. add the changes
git add .

# 2. commit the changes. the quotes are necessary
git commit -m "MESSAGE"

# 3.  put the saved code on github
git push

To start Hugo Server

hugo server -D

What does '.' and '../' mean?

# open _current_ directory
code .

# open _parent_ directory
code ../

To comment out anything

  1. Highlight the anythign you want to comment out.
  2. Press ⌘ + /
@peterbsmyth
Copy link
Author

Top Git Commands

git checkout <BRANCH_NAME>
git clone <REPOSITORY URL>
git push
git pull
git checkout <BRANCH_NAME>
git branch
git fetch

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