Bare Minimum Git


  1. Sign up for an account at
  2. Send me (salcode) a message through Bitbucket
  3. Download GitHub App /

Sal Ferrarello / @salcode

Bare Minimum Git

Quick, dirty, and fast.

Sal Ferrarello / @salcode

The Value of Version Control

  1. Merging work without overwriting
  2. Easy backs up with restore points

Merging work without overwriting

Image From

Easy backs up with restore points

Image From

Git, GitHub, and Bitbucket

  • Git is the generic "car"
  • GitHub is a BMW
  • Bitbucket is a Toyota

Bitbucket is cheap price, not cheap quality

We use GitHub's app to set things up

Install Git

The GitHub app is a quick way to install /

Skip Setup, Go to Advanced Tab

Mac Preferences

GitHub App Mac Settings

Windows Settings

GitHub App Windows Settings

Close the GitHub App


Repository (repo)
A project within git

Command line? Why?

  • Sets the stage for Sass, grunt, and a host of other tools
  • It is easier, seriously

Note: You will not break your computer

Mac Pro-Tip: Command line to your working directory

cd and drag-and-drop your current directory

Clone a repo

(Copy a project to your computer)

	git clone

You can copy this line directly from Bitbucket

Move into the project directory

	cd burbs

Status of the Project

We use this A LOT

	git status

Modify index.html








Share Your Changes

							git add -A

							git commit -m "add Sal's birthday"

							git push


error: failed to push some refs to
hint: Updates were rejected because
the remote contains work that you do
not have locally...
...first integrate the remote changes
hint: (e.g., 'git pull ...')
before pushing again

Share Your Changes (revised)

							git add -A

							git commit -m "add Sal's birthday"

							git pull

							git push


CONFLICT (content): Merge conflict in index.html
Automatic merge failed; fix conflicts
and then commit the result.

Fixing Conflicts

Edit File - Resolve and remove special lines

(your version here)
(server version here)

							git add -A

							git commit -m "fix merge conflict"

New Repository

  • Make repo on, "Create"
  • Local project folder on your computer, make repo
  • Follow onscreen instructions (I have existing project)

Make repo on, "Create"

Use the same Name as the folder name of your project locally

Local Project Folder

							git init

							git add -A

							git commit -m "initial commit"

One at time, run the command line entries from Bitbucket in the project directory


During a project there are often files you do NOT want to include in your repo.


  • Thumbs.db
  • php_error.log
  • ironcode.sublime-project
  • /node_modules
  • uploads directory
  • wp-config.php
  • core WordPress files

Adding Your .gitignore file

My WordPress .gitignore

ignores everything other than

  • /wp-content/themes/
  • /wp-content/plugins/
  • /wp-content/mu-plugins/

What Just Happened?

Why? Merging, Backups

Refer to cheatsheet on

Sal Ferrarello

I am available for team and individual trainings

Sal Ferrarello / @salcode