What is version control, and why should I care?
Overview of the most important Git functions
What is version control, and why should I care?
Overview of the most important Git functions
Overview of GitHub
What is version control, and why should I care?
Overview of the most important Git functions
Overview of GitHub
Live demo showcasing the concepts
What is version control, and why should I care?
Overview of the most important Git functions
Overview of GitHub
Live demo showcasing the concepts
(interactive) Install Git and a client
What is version control, and why should I care?
Overview of the most important Git functions
Overview of GitHub
Live demo showcasing the concepts
(interactive) Install Git and a client
(interactive) Set up a repository on GitHub for your P1 project
What is version control, and why should I care?
Overview of the most important Git functions
Overview of GitHub
Live demo showcasing the concepts
(interactive) Install Git and a client
(interactive) Set up a repository on GitHub for your P1 project
Exercises (if there's time left)
You have an annotated history of changes
It makes collaboration easy
You have an annotated history of changes
It makes collaboration easy
It provides you with a full backup of your project
You have an annotated history of changes
It makes collaboration easy
It provides you with a full backup of your project
Unlike on services like Dropbox, conflicts are structured and easily resolved
You have an annotated history of changes
It makes collaboration easy
It provides you with a full backup of your project
Unlike on services like Dropbox, conflicts are structured and easily resolved
You have an annotated history of changes
It makes collaboration easy
It provides you with a full backup of your project
Unlike on services like Dropbox, conflicts are structured and easily resolved
You have an annotated history of changes
It makes collaboration easy
It provides you with a full backup of your project
Unlike on services like Dropbox, conflicts are structured and easily resolved
Distributed (as opposed to centralised)
Most popular ⟹ all problems have been had
You have an annotated history of changes
It makes collaboration easy
It provides you with a full backup of your project
Unlike on services like Dropbox, conflicts are structured and easily resolved
Distributed (as opposed to centralised)
Most popular ⟹ all problems have been had
GitHub
Fetch
Branches are simply labels pointing to commits
Git uses these labels to move around in the commit history
Branches are simply labels pointing to commits
Git uses these labels to move around in the commit history
Branches are simply labels pointing to commits
Git uses these labels to move around in the commit history
⤷ on Windows with GitHub Desktop
⤷ and get your project repository ready to go
Download from https://git-scm.com/
Windows users may have to restart after installation to update the system PATH
Install via package manager, e.g.
sudo apt install git
Many options, but to highlight a few:
⤷ very simple client, only most basic features; integrates with GitHub
⤷ more features, fancy UI; free for non-commercial use, requires account or GitHub sign-in
♛ Your editor of choice
⤷ many editors support version control from inside the editor
(e.g. Emacs with Magit, or Vim with Fugitive)
♚ The command line 😏
❗ signing up with uni email ⟹ free private repos
❗ signing up with uni email ⟹ free private repos
Go to github.com and sign up with your @student.aau.dk
email
Go to education.github.com/pack and click Get your Pack
NB: Only one person from each group needs to set up a project repository
On GitHub, log in and click New
Fill in the details;
<your group id>
Go to Settings 🠪 Collaborators
Add each of your group members as a collaborator
Go to Code and click Clone or download
Click Open in Desktop to get started (or copy the URL and open it with your Git client, if you don't use GitHub Desktop)
NB: Only one person from each group needs to set up a project repository
Download a template from janusvm.github.io/aau-project-template
Unpack it in the folder where you cloned the project
In GitHub Desktop (or whatever client you use), stage all the new files
Commit with a message like "Add project template files"
Push to GitHub
Go to the repository page on GitHub (github.com/owner/repo)
Click Clone or download
Clone the repository (by clicking Open in Desktop with GH Desktop, or by using the URL with another client)
After this, you're ready to start writing!
Pull from GitHub to get the latest changes from the other group members
Work on the project
Add and Commit related changes together
Pull again, in case new commits have been pushed in the meantime
If there are any conflicts, resolve them and commit the merge
Push your changes to GitHub, so the other group members can get them
These slides: janusvm.github.io/aau-git-workshop
Very simple introduction to Git: think-like-a-git.net
More comprehensive tutorials: www.atlassian.com/git/tutorials
Tips on writing commit messages: chris.beams.io/posts/git-commit
Fixing mistakes: sethrobertson.github.io/GitFixUm/fixup.html
Google :^)
Feel free to ask questions too!
Keyboard shortcuts
↑, ←, Pg Up, k | Go to previous slide |
↓, →, Pg Dn, Space, j | Go to next slide |
Home | Go to first slide |
End | Go to last slide |
Number + Return | Go to specific slide |
b / m / f | Toggle blackout / mirrored / fullscreen mode |
c | Clone slideshow |
p | Toggle presenter mode |
t | Restart the presentation timer |
?, h | Toggle this help |
Esc | Back to slideshow |