git and github getting started - experts live netherlands · 2019-06-20 · devops & automation...
TRANSCRIPT
DEVOPS &
AUTOMATION
Git and GitHub getting
started
Rick Van Rousselt
DEVOPS &
AUTOMATION
Rick Van Rousselt
CTO Advantive Belgium
Office Apps and Services MVP
BIWUG Board Member
What is Git
DEVOPS &
AUTOMATION What is Git
Started in 2005
Created by Linus Torvald to aid in Linux kernel
development
DEVOPS &
AUTOMATION Distributed source control
Peer-to-peer approach
• Every user has a full version of the code + all the history
You don’t need to be connected to the internet
• A central server is only required when sharing changes
Working copies function as remote backups
Faster because its local
DEVOPS &
AUTOMATION
DEVOPS &
AUTOMATION
DEMO
DEVOPS &
AUTOMATION Key Concepts : Snapshots
The way git keeps track of the history
Essentially records what all your files look like at a
given point in time
Have the ability to go back and visit any snapshot
DEVOPS &
AUTOMATION Key Concepts : Commit
The act of creating a snapshot
A project is made up of a bunch of commits
Contains 3 key pieces of information
• Information about how the files changed
• A reference to the commit that came before it
• A hash code name
DEVOPS &
AUTOMATION Key Concepts : Repositories
Or a Repo for short
A collection of all the files and the history of those files
• All your commits
The act of copying a repo from a remote server is called
cloning
DEVOPS &
AUTOMATION Remote repository
Not required. Just makes it easy
This is where GitHub comes into the picture
DEVOPS &
AUTOMATION
Version control
• Push
• Pull
• Commit
Makes collaboration easier
• Issues
• Pull requests (merge requests) stands for :
asking somebody to pull your changes down
locally
Largest web-based git repository hosting service
Founded in 2008
Recently acquired by Microsoft
DEVOPS &
AUTOMATION
DEVOPS &
AUTOMATION
DEMO
DEVOPS &
AUTOMATION
GitHub workflow
DEVOPS &
AUTOMATION GitHub workflow
1. Create a branch
• Branching is very different to for instance TFS => we are
not creating a new directory and copying code there
• Just a pointer => looks exactly like the master version
DEVOPS &
AUTOMATION GitHub workflow
2. Commit
• Snapshot
• Make it small
DEVOPS &
AUTOMATION GitHub workflow
3. Open a Pull Request
• Conversation about the code you checked in
DEVOPS &
AUTOMATION GitHub workflow
Make more commits if necessary
DEVOPS &
AUTOMATION GitHub workflow
5. (optional) Deploy from branch if you
want to test
Or merge back to master
DEVOPS &
AUTOMATION
Git workflow
DEVOPS &
AUTOMATION
DEVOPS &
AUTOMATION
DEVOPS &
AUTOMATION
DEVOPS &
AUTOMATION
DEVOPS &
AUTOMATION
DEVOPS &
AUTOMATION
GitHub in the browser
DEVOPS &
AUTOMATION
DEVOPS &
AUTOMATION
GitHub in Visual Studio
DEVOPS &
AUTOMATION
DEVOPS &
AUTOMATION
Using GitHub for your
website
DEVOPS &
AUTOMATION