3. What is Git?
Source control
Tool for sharing
Tool for learning
Tool to make experiments easy
A FREAKING TIME MACHINE
Going to show command line &
GUI
5. What do we
have to
cover
1. Get Git
2. Config
3. Init Git
4. Status
5. Add file
6. Commit
7. Log
8. Undo
9. Diff
10. GitHub
11. Clone
12. Fork
13. Push & Pull
14. Pull Request
6. How to get Git
Download from: git-scm.com
Or from your favourite package
manager
Mac: $ brew install git
Debian: $ apt-get install git
Windows: $ winget install git
Or it is in your favourite
development tools 💕
7. Just text files
Name & email are the most (only)
important
$ git config --global user.name "John
Doe"
$ git config --global user.email
johndoe@example.com
Config
10. Add
Files can be untracked, so this tells git to start tracking them
Git can then know if it modified or unmodified
Add tells git to both start tracking (if needed) and stage it
Staging means you can choose what to save each time
Tip: . = wildcard
11. Commit
Tells Git to save a copy of the work
Add a message to help you remember it
16. GitHub
Central location for your code, documents…
anything
Can be private or public
Great for sharing
github.com/South-Africa-Government-
Procurement/Data-cleaning
17. Clone
Make a copy of the source
Sets a remote location too so you
can update later
Something you do very rarely
Internal work, used
External work, not used
18. Fork
Make a copy of a repository in
GitHub
Gives you a place you control
All part of GitHub
20. Pull Request
Compare a fork to another repo
and make a difference
Create a document and allow the
owners of the other repo to accept
it
Way to send code from your place
of play, to others