SlideShare a Scribd company logo
Git and the world of
collaborative projects
Zhixing Che
Boston University DSC
Boston University Developer Student Club
What is Git and Github?
● Git is a version control system (VCS)
○ easier to have multiple versions of code base sometimes across multiple developers
● Github is a website that hosts git repositories on a remote server
○ if git are movies, Github is like Netflix
○ the most popular git repository website, many developers’ portfolio of
choice
What is Version control?
Let’s try it out!
● Check that git is installed and that you have a github account
○ run `$ git` in terminal
○ if you don’t have it yet, you can find installation guide on git’s website
● Configure git if it is your first time using it
○ `$ git config --global user.name “firstname lastname”`
○ `$ git config --global user.name “email@email.com”`
Connect to repository hosted on Github
● Create a repository on your personal page on github
○ several options to set up your local repo for that project
■ SSH
■ HTTPS
■ Terminal commands (more on it later)
● SSH sidenote
○ It is common and recommended to configure git and github to recognize Secured
Shell (SSH) keys that you generate, so you don’t need to enter github password each
time
○ you can check so by going to https://github.com/settings/keys
Git / Github Workflow
● Open pull request on Github for preparation for merging
● Stage commits for files to be added into the repository
○ `$ git add <filename> `
○ `$ git add . `
● Commit changes and leave description
○ `$ git commit -m <message> `
● Push changes to save them
○ `$ git push origin <branch name> `
Git / Github Workflow
● Create a new branch of a project for testing out new functionalities/versions
● Resolve merge conflicts before merging
○ will be automatically checked by Github
● Merge
○ 3 types of merging
Git Branching
● View current branches
○ `$ git branch`
● Create a new branch
○ `$ git checkout -b <branch name>`
● Switch to existing branch
○ `$ git checkout <branch name>`
Merge, Squash & Merge, Rebase & Merge
● Merge vs Rebase (feature here just refers to a topic branch)
○ merge is generally easier, can done from command line
■ `git checkout feature` then `git merge feature master`
■ non-destructive operation that ties the histories of both branches. This
preserves the exact history of your project
■ may lead to muddling of the history of branch since it essentially creates
a forked history
○ rebase
■ `git checkout feature` then `git merge feature master`
■ move the entire feature branch to start from the tip of the master branch
by rewriting the project history and creating brand new commits for each
commit in the original branch.
■ singular history with no forking of commit history
■ may lose context
Lots of cool stuff on Github!
● Explore projects and fork them!
○ fork creates a copy of another repo
● Nice GUI
○ compare branches
○ make wiki for project
○ also capability to utilize github desktop and do things on GUI
■ https://guides.github.com/activities/hello-world/
■ though, command line knowledge is important for cs in college and
beyond :)
Resources & Docs
● https://git-scm.com/doc
● https://docs.github.com/
● https://guides.github.com/introduction/git-handbook/
● https://missing.csail.mit.edu/2020/version-control/
@bostonu_dsc
dsc.community.dev/boston-university/
interest form: rb.gy/orfryz
Connect with us!
fb: Boston University Developer Student Club

More Related Content

What's hot

Git for beginners
Git for beginnersGit for beginners
Git for beginners
Arulmurugan Rajaraman
 
Advanced Git Tutorial
Advanced Git TutorialAdvanced Git Tutorial
Advanced Git Tutorial
Sage Sharp
 
Git - An Introduction
Git - An IntroductionGit - An Introduction
Git - An Introduction
Behzad Altaf
 
git and github
git and githubgit and github
git and github
Darren Oakley
 
Git and Github Session
Git and Github SessionGit and Github Session
Git and Github Session
GoogleDevelopersStud1
 
Advanced Git Presentation By Swawibe
Advanced Git Presentation By SwawibeAdvanced Git Presentation By Swawibe
Advanced Git Presentation By Swawibe
Md Swawibe Ul Alam
 
Git One Day Training Notes
Git One Day Training NotesGit One Day Training Notes
Git One Day Training Notes
glen_a_smith
 
Introduction git
Introduction gitIntroduction git
Introduction git
Dian Sigit Prastowo
 
Git in 10 minutes
Git in 10 minutesGit in 10 minutes
Git in 10 minutes
Safique Ahmed Faruque
 
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overviewGit and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Rueful Robin
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
Roland Emmanuel Salunga
 
A Practical Introduction to git
A Practical Introduction to gitA Practical Introduction to git
A Practical Introduction to git
Emanuele Olivetti
 
Introduction to git hub
Introduction to git hubIntroduction to git hub
Introduction to git hub
Naveen Pandey
 
Starting with Git & GitHub
Starting with Git & GitHubStarting with Git & GitHub
Starting with Git & GitHub
Nicolás Tourné
 
Git basics
Git basicsGit basics
Git basics
GHARSALLAH Mohamed
 
Git and github
Git and githubGit and github
Git and github
Sayantika Banik
 
Git basic
Git basicGit basic
Git basic
Emran Ul Hadi
 
Git n git hub
Git n git hubGit n git hub
Git n git hub
Jiwon Baek
 
Git & Github for beginners
Git & Github for beginnersGit & Github for beginners
Git & Github for beginners
Paulo Henrique Nonaka
 

What's hot (20)

Git for beginners
Git for beginnersGit for beginners
Git for beginners
 
Advanced Git Tutorial
Advanced Git TutorialAdvanced Git Tutorial
Advanced Git Tutorial
 
Git real slides
Git real slidesGit real slides
Git real slides
 
Git - An Introduction
Git - An IntroductionGit - An Introduction
Git - An Introduction
 
git and github
git and githubgit and github
git and github
 
Git and Github Session
Git and Github SessionGit and Github Session
Git and Github Session
 
Advanced Git Presentation By Swawibe
Advanced Git Presentation By SwawibeAdvanced Git Presentation By Swawibe
Advanced Git Presentation By Swawibe
 
Git One Day Training Notes
Git One Day Training NotesGit One Day Training Notes
Git One Day Training Notes
 
Introduction git
Introduction gitIntroduction git
Introduction git
 
Git in 10 minutes
Git in 10 minutesGit in 10 minutes
Git in 10 minutes
 
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overviewGit and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 
A Practical Introduction to git
A Practical Introduction to gitA Practical Introduction to git
A Practical Introduction to git
 
Introduction to git hub
Introduction to git hubIntroduction to git hub
Introduction to git hub
 
Starting with Git & GitHub
Starting with Git & GitHubStarting with Git & GitHub
Starting with Git & GitHub
 
Git basics
Git basicsGit basics
Git basics
 
Git and github
Git and githubGit and github
Git and github
 
Git basic
Git basicGit basic
Git basic
 
Git n git hub
Git n git hubGit n git hub
Git n git hub
 
Git & Github for beginners
Git & Github for beginnersGit & Github for beginners
Git & Github for beginners
 

Similar to Git & GitHub WorkShop

GIT_GITHUB_2016_06_17
GIT_GITHUB_2016_06_17GIT_GITHUB_2016_06_17
GIT_GITHUB_2016_06_17siva ram
 
Git: Why And How to
Git: Why And How toGit: Why And How to
Git: Why And How to
lanhuonga3
 
[PUBLIC] Git – Concepts and Workflows.pdf
[PUBLIC] Git – Concepts and Workflows.pdf[PUBLIC] Git – Concepts and Workflows.pdf
[PUBLIC] Git – Concepts and Workflows.pdf
ChimaEzeamama1
 
Brief tutorial on Git
Brief tutorial on GitBrief tutorial on Git
Brief tutorial on Git
聖文 鄭
 
Beginner's Guide to Version Control with Git
Beginner's Guide to Version Control with GitBeginner's Guide to Version Control with Git
Beginner's Guide to Version Control with GitRobert Lee-Cann
 
Git and Github slides.pdf
Git and Github slides.pdfGit and Github slides.pdf
Git and Github slides.pdf
Tilton2
 
Git and Github workshop ppt slide by slide
Git and Github workshop ppt slide by slideGit and Github workshop ppt slide by slide
Git and Github workshop ppt slide by slide
RaghavendraVattikuti1
 
Getting some Git
Getting some GitGetting some Git
Getting some Git
BADR
 
14 oct Git & GitHub.pptx
14 oct Git & GitHub.pptx14 oct Git & GitHub.pptx
14 oct Git & GitHub.pptx
GDSCGHRIETNagpur
 
Git and git workflow best practice
Git and git workflow best practiceGit and git workflow best practice
Git and git workflow best practice
Majid Hosseini
 
Git Init (Introduction to Git)
Git Init (Introduction to Git)Git Init (Introduction to Git)
Git Init (Introduction to Git)
GDSC UofT Mississauga
 
Collaborative development with Git | Workshop
Collaborative development with Git | WorkshopCollaborative development with Git | Workshop
Collaborative development with Git | Workshop
Anuchit Chalothorn
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHub
Priya Nayak
 
Git with the flow
Git with the flowGit with the flow
Git with the flow
Dana White
 
Git Introductive
Git IntroductiveGit Introductive
Git IntroductiveAdham Saad
 
Git and GitHub Info Session
Git and GitHub Info SessionGit and GitHub Info Session
Git and GitHub Info Session
SawanBhattacharya
 
Git & github
Git & githubGit & github
Git & github
MicroPyramid .
 
Git tech talk
Git tech talkGit tech talk
Git tech talkrazasayed
 

Similar to Git & GitHub WorkShop (20)

GIT_GITHUB_2016_06_17
GIT_GITHUB_2016_06_17GIT_GITHUB_2016_06_17
GIT_GITHUB_2016_06_17
 
Git: Why And How to
Git: Why And How toGit: Why And How to
Git: Why And How to
 
[PUBLIC] Git – Concepts and Workflows.pdf
[PUBLIC] Git – Concepts and Workflows.pdf[PUBLIC] Git – Concepts and Workflows.pdf
[PUBLIC] Git – Concepts and Workflows.pdf
 
Brief tutorial on Git
Brief tutorial on GitBrief tutorial on Git
Brief tutorial on Git
 
Beginner's Guide to Version Control with Git
Beginner's Guide to Version Control with GitBeginner's Guide to Version Control with Git
Beginner's Guide to Version Control with Git
 
Git and Github slides.pdf
Git and Github slides.pdfGit and Github slides.pdf
Git and Github slides.pdf
 
Git and Github workshop ppt slide by slide
Git and Github workshop ppt slide by slideGit and Github workshop ppt slide by slide
Git and Github workshop ppt slide by slide
 
Git tips
Git tipsGit tips
Git tips
 
Getting some Git
Getting some GitGetting some Git
Getting some Git
 
14 oct Git & GitHub.pptx
14 oct Git & GitHub.pptx14 oct Git & GitHub.pptx
14 oct Git & GitHub.pptx
 
Git and git workflow best practice
Git and git workflow best practiceGit and git workflow best practice
Git and git workflow best practice
 
Git Init (Introduction to Git)
Git Init (Introduction to Git)Git Init (Introduction to Git)
Git Init (Introduction to Git)
 
Collaborative development with Git | Workshop
Collaborative development with Git | WorkshopCollaborative development with Git | Workshop
Collaborative development with Git | Workshop
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHub
 
Git with the flow
Git with the flowGit with the flow
Git with the flow
 
Git Introductive
Git IntroductiveGit Introductive
Git Introductive
 
setting up a repository using GIT
setting up a repository using GITsetting up a repository using GIT
setting up a repository using GIT
 
Git and GitHub Info Session
Git and GitHub Info SessionGit and GitHub Info Session
Git and GitHub Info Session
 
Git & github
Git & githubGit & github
Git & github
 
Git tech talk
Git tech talkGit tech talk
Git tech talk
 

More from SheilaJimenezMorejon

Add a backend and deploy!
Add a backend and deploy!Add a backend and deploy!
Add a backend and deploy!
SheilaJimenezMorejon
 
Build a chatroom!
Build a chatroom!Build a chatroom!
Build a chatroom!
SheilaJimenezMorejon
 
Introduction to Applied Machine Learning
Introduction to Applied Machine LearningIntroduction to Applied Machine Learning
Introduction to Applied Machine Learning
SheilaJimenezMorejon
 
Intro to React
Intro to ReactIntro to React
Intro to React
SheilaJimenezMorejon
 
Building Beautiful Flutter Apps
Building Beautiful Flutter AppsBuilding Beautiful Flutter Apps
Building Beautiful Flutter Apps
SheilaJimenezMorejon
 
Information session
Information sessionInformation session
Information session
SheilaJimenezMorejon
 
Flutter introduction
Flutter introductionFlutter introduction
Flutter introduction
SheilaJimenezMorejon
 

More from SheilaJimenezMorejon (7)

Add a backend and deploy!
Add a backend and deploy!Add a backend and deploy!
Add a backend and deploy!
 
Build a chatroom!
Build a chatroom!Build a chatroom!
Build a chatroom!
 
Introduction to Applied Machine Learning
Introduction to Applied Machine LearningIntroduction to Applied Machine Learning
Introduction to Applied Machine Learning
 
Intro to React
Intro to ReactIntro to React
Intro to React
 
Building Beautiful Flutter Apps
Building Beautiful Flutter AppsBuilding Beautiful Flutter Apps
Building Beautiful Flutter Apps
 
Information session
Information sessionInformation session
Information session
 
Flutter introduction
Flutter introductionFlutter introduction
Flutter introduction
 

Recently uploaded

Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Abida Shariff
 

Recently uploaded (20)

Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 

Git & GitHub WorkShop

  • 1. Git and the world of collaborative projects Zhixing Che Boston University DSC Boston University Developer Student Club
  • 2. What is Git and Github? ● Git is a version control system (VCS) ○ easier to have multiple versions of code base sometimes across multiple developers ● Github is a website that hosts git repositories on a remote server ○ if git are movies, Github is like Netflix ○ the most popular git repository website, many developers’ portfolio of choice
  • 3. What is Version control?
  • 4. Let’s try it out! ● Check that git is installed and that you have a github account ○ run `$ git` in terminal ○ if you don’t have it yet, you can find installation guide on git’s website ● Configure git if it is your first time using it ○ `$ git config --global user.name “firstname lastname”` ○ `$ git config --global user.name “email@email.com”`
  • 5. Connect to repository hosted on Github ● Create a repository on your personal page on github ○ several options to set up your local repo for that project ■ SSH ■ HTTPS ■ Terminal commands (more on it later) ● SSH sidenote ○ It is common and recommended to configure git and github to recognize Secured Shell (SSH) keys that you generate, so you don’t need to enter github password each time ○ you can check so by going to https://github.com/settings/keys
  • 6.
  • 7. Git / Github Workflow ● Open pull request on Github for preparation for merging ● Stage commits for files to be added into the repository ○ `$ git add <filename> ` ○ `$ git add . ` ● Commit changes and leave description ○ `$ git commit -m <message> ` ● Push changes to save them ○ `$ git push origin <branch name> `
  • 8. Git / Github Workflow ● Create a new branch of a project for testing out new functionalities/versions ● Resolve merge conflicts before merging ○ will be automatically checked by Github ● Merge ○ 3 types of merging
  • 9. Git Branching ● View current branches ○ `$ git branch` ● Create a new branch ○ `$ git checkout -b <branch name>` ● Switch to existing branch ○ `$ git checkout <branch name>`
  • 10. Merge, Squash & Merge, Rebase & Merge ● Merge vs Rebase (feature here just refers to a topic branch) ○ merge is generally easier, can done from command line ■ `git checkout feature` then `git merge feature master` ■ non-destructive operation that ties the histories of both branches. This preserves the exact history of your project ■ may lead to muddling of the history of branch since it essentially creates a forked history ○ rebase ■ `git checkout feature` then `git merge feature master` ■ move the entire feature branch to start from the tip of the master branch by rewriting the project history and creating brand new commits for each commit in the original branch. ■ singular history with no forking of commit history ■ may lose context
  • 11. Lots of cool stuff on Github! ● Explore projects and fork them! ○ fork creates a copy of another repo ● Nice GUI ○ compare branches ○ make wiki for project ○ also capability to utilize github desktop and do things on GUI ■ https://guides.github.com/activities/hello-world/ ■ though, command line knowledge is important for cs in college and beyond :)
  • 12. Resources & Docs ● https://git-scm.com/doc ● https://docs.github.com/ ● https://guides.github.com/introduction/git-handbook/ ● https://missing.csail.mit.edu/2020/version-control/
  • 13. @bostonu_dsc dsc.community.dev/boston-university/ interest form: rb.gy/orfryz Connect with us! fb: Boston University Developer Student Club