Skip to content

Latest commit

 

History

History
32 lines (15 loc) · 1.02 KB

File metadata and controls

32 lines (15 loc) · 1.02 KB

Here is a list of commands that will help you navigate Git and GitHub in your command line.

Note: these are Mac commands! Windows forthcoming.

cd [name of directory or folder] will let you navigate inside a directory of your choosing.

cd ~ lets you go back a directory.

pwd or "print working directory" will tell you where you are if you get a little lost.

mkdir [name] makes a new directory.

git init (initiates git for this directory).

touch [name].md makes a new markdown file, which is plain text, in whatever directory you're in in the command line.

open [name].[extension] lets you open a file and begin editing it.

git status checks the status of your commits. Use often!

git add [filename].md stages the file.

git commit -a or git commit -m "(text)" commits the changes.

git push -u origin master pushes commits to the master branch.

git pull [URL of remote repo] updates your local repo with remote changes.

git clone [URL of remote repo] makes a local copy of a repo for you to edit.