ݺߣ

ݺߣShare a Scribd company logo
Git basics
Working knowledge in git
Anthony Eli Agbenu
@_agbenu
Outline
? Introduction
? How to install Git
? File lifecycle processes
? How to start
? Branches
? Demo
? Resources
Introduction
What is Git ?
? What is Git ?
? What Git is not ?
? Benefits of using Git ?
How to install Git
? Recommended method is to download CLI tool https://git-
scm.com/downloads
? Check it works by typing git into terminal
Lifecycle processes
Untracked
Unmodified
Modified
Staged
Localrepo
Remoterepo
How to start
Start your own repository
> git init
Start with some elses repository
> git clone
Saving files
? Adding to staging area
? > git add <files> or
? > git add Call or
? > git add .
? Saving to local repo
? > git commit
? Saving to remote repo ( external or internal )
- > git push
Branches
? Movable pointer to a commit
? > git branch <new-branch-name>
? > git checkout <existing-branch-name>
? > git merge <other-branch-name>
DEMO
? Try the following list of commands
? What happens on each step
DEMO ( cont )
? > git clone https://github.com/agbenu/DemonstrationOnGit.git
? > cd DemonstrationOnGit
? > git status
? > git checkout -b my-new-feature
? Edit something in the file
? > git status
? > git add --all
? > git status
? > git diff HEAD
? > git commit -m Made changes to file
? > git status
? > git log
? > git push origin HEAD
? > git checkout master
? > git pull
Resources
? https://git-scm.com/docs/

More Related Content

Git basics