Commit with Git – git b4 u commit – Making a new repository



Commit with Git – git b4 u commit – Making a new repository

0 1


commit_with_git

for teaching!

On Github ablwr / commit_with_git

Commit with Git

git b4 u commit

Because not knowing how to use code version control before getting married would be a huge mistake

Your e-hostess, Ashley Blewer

Working Solo

Making a new repository

cd path/to/directory

git init

https://github.com/new

Ya gotta go here.

Committing

git add $file git add . to add all files

Oops

git reset $file git checkout $file

Bigger oops

git rm $file

The biggest oops of all

git checkout HEAD $file

Push/Pull

Branching

Make a new branch

git branch $branchname

Switch to branch

git checkout $branchname

Cloning a repository

git clone $file

Cloning and/or forking

Working with others

Adding a remote

git remote add origin git@github.com:ablwr/commit_with_git.git

git remote add kathryn git@github.com:kgrons/commit_with_git.git

Pull requests

THE END

git --help