a very basic intro to version control and git

Sitaram Chamarty (sitaramc@gmail.com)

1 preface

why

what is a VCS

why use a VCS

2 some simple operations

creating a repository

an empty directory

add some files

‘git init’ – done!

how about on windows?

done!

double check…

yup – works fine!

CLI on windows?

a bash shell

‘git init’ – done!

3 basic definitions

what is a ‘work tree’

what is a ‘repo’

repository

(what’s inside ‘.git’?)

4 non-linear snapshots…

‘non-linear’

  • a repository keeps snapshots of the work tree…
  • …at different points in time

snap

snapshots

snapshots of the work tree

at different

at different points

at different points in time

5 definitions revisited

what is a commit

remember those snapshots? Yup – they’re all commits!

Here, to refresh your memory:

what is a repo again?

DAG

6 branches and tags

what is a branch

what is a tag

7 DVCS and git concepts

general VCS concepts

a DVCS is different

central repo in a DVCS?

what is a ‘remote’

git concepts

branches

branch also boost individual productivity

git concepts (cont’d)

git concepts (cont’d)

some more git concepts

8 workflow

git developer workflow

one-time setup

err… clone? from where?

many users/repos?

normal workflow activities

normal workflow activities

clean and dirty work tree

clean tree - CLI

clean tree - GUI

dirty tree - CLI

dirty tree - GUI

staging from the GUI

staged files - CLI

committing from the GUI

clean again!

9 (other topics)

conflicts

advanced workflow activities

…and we’re done!