Slide 1

Slide 1 text

Version control with Git and Github - Nnabueze Uhiara (software developer, iQube labs) @_NezSpencer https://github.com/NezSpencer

Slide 2

Slide 2 text

Main points ● What is version control? ● Why version control? ● Why Git? ● Why github? ● Setting up git ● Git (proposed) workflow

Slide 3

Slide 3 text

What is Version control System (VCS)? A system that records changes to a file or set of files over time so that you can recall specific versions later.

Slide 4

Slide 4 text

Why Version control? ● Collaboration ● Synchronization ● Knowing what changed and why it changed(diff, log and commit messages) ● Allows undo (reverting to earlier versions) ● Backup

Slide 5

Slide 5 text

VCS contd 2 types of VCS:

Slide 6

Slide 6 text

Git? ● It is a distributed VCS ● Enables offline work ● Immunity to explore/try out new things ● Large community

Slide 7

Slide 7 text

Why GitHub? ● Large community of fellow devs ● Integrates seamlessly with other dev platforms ● Helps to boost your CV ● Show your work to the dev world. ● Apparently gives you the liberty to use fork indiscriminately not minding what it rhymes with. PS: Git != GitHub

Slide 8

Slide 8 text

Setting up git on your PC Go to https://git-scm.com/downloads and follow the instructions there to install git for your OS type

Slide 9

Slide 9 text

Setting up a new git repo ● Git init ● Setup .gitignore ● Git add ● Git commit -m “commit message” ● Git remote add origin https:gitrepo.git ● Git push -u origin master

Slide 10

Slide 10 text

Working with existing git repo Git clone

Slide 11

Slide 11 text

Common git commands ● Clone, ● Checkout ● Branch ● Merge ● Rebase ● Commit ● Push ● pull

Slide 12

Slide 12 text

Proposed git workflow Working on a new feature? Create a new branch : git checkout -b OR git branch git checkout

Slide 13

Slide 13 text

How important is git/version control?

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

Merge conflicts When does a merge conflict occur?/ What causes a merge conflict? Set up default merge-tool: git mergetool

Slide 16

Slide 16 text

git commit -m “THANKS FOR LISTENING”