Raspberry Pi Club

The Command Line, Git, and GitHub

3/6/17

The Command Line

Know where you are

ls
pwd

print working directory

See what you have

list

cd

Move around

change directory

ls -a

See even hidden files

list all

The Command Line

mkdir <folder name>

Add a directory (folder)

touch <file name>

Add a file

make directory

rm -rf <directory name>

Remove a directory (folder)

rm <file name>

Remove a file

The Command Line

Practice

Git

sudo apt-get install git

Install git

git checkout -b <branch name>

Make a new Branch

Check the status

git status
git add <file name>

Stage Files

git commit -m <commit message>

Commit Changes

git push origin <branch name>

Push Changes Up

git clone <github link>

Clone down a repo

Pull Requests

git fetch

Fetch Changes

git pull origin <branch name>

and

Other Commands

Pull Changes Down

Raspberry Pi Club

By Delaine Wendling

Raspberry Pi Club

  • 1,192