SlideShare a Scribd company logo
Our project on GitHub http: //github . com/jasonnoble/event_scheduler Click Fork
Fork Command Fork is a GitHub thing, it’s not a Git command Clicking fork basically copies a repo on Github into your Github account This provides a public repo that you have access to push your changes to
Public/Private Repo Setup Jasonnoble/ event_scheduler (on GitHub) your-user-name/ event_scheduler (on GitHub) hosh/ event_scheduler (on GitHub) Fork Other Public Repos event_scheduler  Local Repo Clone Your Public Repo Project Public Repo stonean/ event_scheduler (on GitHub) Public Repo Private Repo
Your project on GitHub http://github.com/your-user-name/event_scheduler
Clone your Repo git clone  [email_address] .com: your-user-name/event_scheduler . git cd event_scheduler git pull Should say “Already up-to-date” This clone command adds a remote repo “origin”  (explained in detail later) A clone is the entire history of the Git Repo History of all changes Log messages
Modify a file vi (or your favorite editor) AUTHORS Add your name Save the file
Git diff git diff Shows what has changed since your last commit
Git Status Shows the status of your  git repo / working directory git status
Git add Stages files to be committed git add AUTHORS
Git Commit Commit your changes git commit -v Options: a  Add all known files v  Verbose (show diff in editor) m  Command line commit message
Git commit (cont.)
Pushing/Pulling to Origin Jasonnoble/ event_scheduler your-user-name/ event_scheduler hosh/ event_scheduler Other forks event_scheduler Local Repo git pull  origin git push  Allowed by default Requires permission Remotes: origin upstream hosh
Git Push Push your changes to GitHub git push origin master
Pushing/Pulling to upstream Jasonnoble/event_scheduler your-user-name/event_scheduler hosh/event_scheduler Other forks event_scheduler  Local Repo upstream origin hosh Allowed by default Requires permission git push upstream master git pull upstream master Remotes: origin upstream hosh
Add upstream In order to pull updates from other sources, you need to add a remote server
Add upstream (cont.) git remote add upstream  git://github.com/jasonnoble/event_scheduler.git “ upstream” is whatever you want to call it “ upstream” for the repo you forked from is a GitHub convention git fetch upstream Fetches references from upstream
Create local branch git checkout --track -b upstream-master upstream/master upstream-master is what you will call it locally
Pull remote changes git checkout upstream-master git pull pull updates from the remote
Show diffs between branches git show-branch
Merge branches git checkout master git merge upstream-master Merges any changes committed to upstream-master into the master branch After merge, do a git push to push that merge to your public repo on GitHub
Pulling from Upstream Lab I will commit a change to my public repo (upstream) You add upstream as a remote repo Pull from the repo to get the changes
Pushing/Pulling to other remote repos Jasonnoble/ event_scheduler your-user-name/ event_scheduler hosh/ event_scheduler Other forks event_scheduler  Local Repo upstream origin hosh git push hosh master git pull hosh master Allowed by default Requires permission Remotes: origin upstream hosh
Practice makes perfect Find a pair to work with Add their remote repo git remote add _____ git://github….. Fetch refs git fetch _______ Create Branch git checkout --track  -b ______  _____/master
Practice makes perfect  (Cont.) Make some changes, push them to origin/master and have your pair pull those changes Switch roles and you pull changes they’ve pushed Play with the “pull request” feature of GitHub

More Related Content

What's hot (20)

PDF
Git cheat sheet
Lam Hoang
 
ODP
Openstack contribution process
Syed Armani
 
PDF
Introduction to Git
Rick Umali
 
PDF
Introduction to Git Version Control System
Oleksandr Zaitsev
 
PDF
とりあえずはじめるChatOps
正貴 小川
 
PPTX
Git first contributions
Yogendra Sharma
 
PDF
GIT - GOOD PRACTICES
Rodolfo Spalenza
 
DOCX
Git github
Anurag Deb
 
PPT
Git Cards - Keynote Format
Adam Lowe
 
PDF
Git Tricks — git utilities that make life git easier
Christoph Matthies
 
PDF
My Notes from https://www.codeschool.com/courses/git-real
Eneldo Serrata
 
PDF
Git–SVN
Ali Servet Donmez
 
PDF
Git - Get Ready To Use It
Daniel Kummer
 
PDF
Undoing Things in Git
gittower
 
PPTX
Git basic
Akbar Uddin
 
PDF
Git real slides
Lucas Couto
 
KEY
Gittalk
prtinsley
 
PPT
Git Cards - Powerpoint Format
Adam Lowe
 
PDF
Git Series. Episode 2. Merge, Upstream Commands and Tags
Mikhail Melnik
 
Git cheat sheet
Lam Hoang
 
Openstack contribution process
Syed Armani
 
Introduction to Git
Rick Umali
 
Introduction to Git Version Control System
Oleksandr Zaitsev
 
とりあえずはじめるChatOps
正貴 小川
 
Git first contributions
Yogendra Sharma
 
GIT - GOOD PRACTICES
Rodolfo Spalenza
 
Git github
Anurag Deb
 
Git Cards - Keynote Format
Adam Lowe
 
Git Tricks — git utilities that make life git easier
Christoph Matthies
 
My Notes from https://www.codeschool.com/courses/git-real
Eneldo Serrata
 
Git - Get Ready To Use It
Daniel Kummer
 
Undoing Things in Git
gittower
 
Git basic
Akbar Uddin
 
Git real slides
Lucas Couto
 
Gittalk
prtinsley
 
Git Cards - Powerpoint Format
Adam Lowe
 
Git Series. Episode 2. Merge, Upstream Commands and Tags
Mikhail Melnik
 

Similar to Git102 (20)

PDF
Git hub party-20151008
Blanca Mancilla
 
PDF
github-actions.pdf
AbhaymithraReddy1
 
ODP
Practical git for developers
Wim Godden
 
PPTX
Get your Git on GitHub
Runcy Oommen
 
PPTX
Git and github introduction
John(Qiang) Zhang
 
PPTX
tech winter break workshop on git &git hub.pptx
ashishraulin
 
PPTX
Git and GitHub workshop of GDG on Campus UNSTPB
AmaraCostachiu
 
PDF
Git & GitHub WorkShop
SheilaJimenezMorejon
 
PPTX
Git and GitHub
Priya Nayak
 
PPTX
Understanding Github and Version Control System.pptx
AdebisiJoe
 
PPTX
Git and GitHub Presentation of GDG on Campus UNSTPB
AmaraCostachiu
 
PPTX
Git and GitHub Workshop of GDG on Campus UNSTPB
AmaraCostachiu
 
PDF
Git Init (Introduction to Git)
GDSC UofT Mississauga
 
PPTX
GitHub Event.pptx
KeerthanaJ32
 
PPTX
Git and GitHub Workshop of GDG on Campus UNSTPB
AmaraCostachiu
 
PPTX
Introduction to Git and Github
Md Atique Ahmed Ziad
 
PPTX
Git and GitHub (1).pptx
BetelAddisu
 
PPTX
Git and Github.pptx
Hitesh670643
 
PDF
git and github
Darren Oakley
 
PPTX
Git first steps
IgorSteinmacher
 
Git hub party-20151008
Blanca Mancilla
 
github-actions.pdf
AbhaymithraReddy1
 
Practical git for developers
Wim Godden
 
Get your Git on GitHub
Runcy Oommen
 
Git and github introduction
John(Qiang) Zhang
 
tech winter break workshop on git &git hub.pptx
ashishraulin
 
Git and GitHub workshop of GDG on Campus UNSTPB
AmaraCostachiu
 
Git & GitHub WorkShop
SheilaJimenezMorejon
 
Git and GitHub
Priya Nayak
 
Understanding Github and Version Control System.pptx
AdebisiJoe
 
Git and GitHub Presentation of GDG on Campus UNSTPB
AmaraCostachiu
 
Git and GitHub Workshop of GDG on Campus UNSTPB
AmaraCostachiu
 
Git Init (Introduction to Git)
GDSC UofT Mississauga
 
GitHub Event.pptx
KeerthanaJ32
 
Git and GitHub Workshop of GDG on Campus UNSTPB
AmaraCostachiu
 
Introduction to Git and Github
Md Atique Ahmed Ziad
 
Git and GitHub (1).pptx
BetelAddisu
 
Git and Github.pptx
Hitesh670643
 
git and github
Darren Oakley
 
Git first steps
IgorSteinmacher
 
Ad

More from Jason Noble (16)

PPTX
Intro to TDD and BDD
Jason Noble
 
PPTX
Davinci git brown_bag
Jason Noble
 
PPTX
Rspec 101
Jason Noble
 
PPTX
Dash of ajax
Jason Noble
 
PPT
jQuery Intro
Jason Noble
 
PPTX
Intro to Rails Give Camp Atlanta
Jason Noble
 
PPTX
Google apps
Jason Noble
 
PPTX
Smarter cart
Jason Noble
 
PPTX
Cart creation-101217222728-phpapp01
Jason Noble
 
PPTX
Catalog display
Jason Noble
 
PPTX
Validation unit testing
Jason Noble
 
PPT
Creating the application
Jason Noble
 
PPT
Capistrano
Jason Noble
 
PPT
Atlanta Pm Git 101
Jason Noble
 
PPT
Regex Intro
Jason Noble
 
PPT
Git101
Jason Noble
 
Intro to TDD and BDD
Jason Noble
 
Davinci git brown_bag
Jason Noble
 
Rspec 101
Jason Noble
 
Dash of ajax
Jason Noble
 
jQuery Intro
Jason Noble
 
Intro to Rails Give Camp Atlanta
Jason Noble
 
Google apps
Jason Noble
 
Smarter cart
Jason Noble
 
Cart creation-101217222728-phpapp01
Jason Noble
 
Catalog display
Jason Noble
 
Validation unit testing
Jason Noble
 
Creating the application
Jason Noble
 
Capistrano
Jason Noble
 
Atlanta Pm Git 101
Jason Noble
 
Regex Intro
Jason Noble
 
Git101
Jason Noble
 
Ad

Recently uploaded (20)

PPTX
Darren Mills The Migration Modernization Balancing Act: Navigating Risks and...
AWS Chicago
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PPTX
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
PPTX
Extensions Framework (XaaS) - Enabling Orchestrate Anything
ShapeBlue
 
PDF
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
PDF
NewMind AI Journal - Weekly Chronicles - July'25 Week II
NewMind AI
 
PDF
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
PPTX
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
PDF
Ampere Offers Energy-Efficient Future For AI And Cloud
ShapeBlue
 
PPTX
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
PDF
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PDF
Shuen Mei Parth Sharma Boost Productivity, Innovation and Efficiency wit...
AWS Chicago
 
PDF
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
PPTX
Top Managed Service Providers in Los Angeles
Captain IT
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PDF
Upskill to Agentic Automation 2025 - Kickoff Meeting
DianaGray10
 
PDF
Arcee AI - building and working with small language models (06/25)
Julien SIMON
 
PDF
Women in Automation Presents: Reinventing Yourself — Bold Career Pivots That ...
DianaGray10
 
PPTX
Building a Production-Ready Barts Health Secure Data Environment Tooling, Acc...
Barts Health
 
Darren Mills The Migration Modernization Balancing Act: Navigating Risks and...
AWS Chicago
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
Extensions Framework (XaaS) - Enabling Orchestrate Anything
ShapeBlue
 
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
NewMind AI Journal - Weekly Chronicles - July'25 Week II
NewMind AI
 
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
Ampere Offers Energy-Efficient Future For AI And Cloud
ShapeBlue
 
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
Shuen Mei Parth Sharma Boost Productivity, Innovation and Efficiency wit...
AWS Chicago
 
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
Top Managed Service Providers in Los Angeles
Captain IT
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
Upskill to Agentic Automation 2025 - Kickoff Meeting
DianaGray10
 
Arcee AI - building and working with small language models (06/25)
Julien SIMON
 
Women in Automation Presents: Reinventing Yourself — Bold Career Pivots That ...
DianaGray10
 
Building a Production-Ready Barts Health Secure Data Environment Tooling, Acc...
Barts Health
 

Git102

  • 1. Our project on GitHub http: //github . com/jasonnoble/event_scheduler Click Fork
  • 2. Fork Command Fork is a GitHub thing, it’s not a Git command Clicking fork basically copies a repo on Github into your Github account This provides a public repo that you have access to push your changes to
  • 3. Public/Private Repo Setup Jasonnoble/ event_scheduler (on GitHub) your-user-name/ event_scheduler (on GitHub) hosh/ event_scheduler (on GitHub) Fork Other Public Repos event_scheduler Local Repo Clone Your Public Repo Project Public Repo stonean/ event_scheduler (on GitHub) Public Repo Private Repo
  • 4. Your project on GitHub http://github.com/your-user-name/event_scheduler
  • 5. Clone your Repo git clone [email_address] .com: your-user-name/event_scheduler . git cd event_scheduler git pull Should say “Already up-to-date” This clone command adds a remote repo “origin” (explained in detail later) A clone is the entire history of the Git Repo History of all changes Log messages
  • 6. Modify a file vi (or your favorite editor) AUTHORS Add your name Save the file
  • 7. Git diff git diff Shows what has changed since your last commit
  • 8. Git Status Shows the status of your git repo / working directory git status
  • 9. Git add Stages files to be committed git add AUTHORS
  • 10. Git Commit Commit your changes git commit -v Options: a Add all known files v Verbose (show diff in editor) m Command line commit message
  • 12. Pushing/Pulling to Origin Jasonnoble/ event_scheduler your-user-name/ event_scheduler hosh/ event_scheduler Other forks event_scheduler Local Repo git pull origin git push Allowed by default Requires permission Remotes: origin upstream hosh
  • 13. Git Push Push your changes to GitHub git push origin master
  • 14. Pushing/Pulling to upstream Jasonnoble/event_scheduler your-user-name/event_scheduler hosh/event_scheduler Other forks event_scheduler Local Repo upstream origin hosh Allowed by default Requires permission git push upstream master git pull upstream master Remotes: origin upstream hosh
  • 15. Add upstream In order to pull updates from other sources, you need to add a remote server
  • 16. Add upstream (cont.) git remote add upstream git://github.com/jasonnoble/event_scheduler.git “ upstream” is whatever you want to call it “ upstream” for the repo you forked from is a GitHub convention git fetch upstream Fetches references from upstream
  • 17. Create local branch git checkout --track -b upstream-master upstream/master upstream-master is what you will call it locally
  • 18. Pull remote changes git checkout upstream-master git pull pull updates from the remote
  • 19. Show diffs between branches git show-branch
  • 20. Merge branches git checkout master git merge upstream-master Merges any changes committed to upstream-master into the master branch After merge, do a git push to push that merge to your public repo on GitHub
  • 21. Pulling from Upstream Lab I will commit a change to my public repo (upstream) You add upstream as a remote repo Pull from the repo to get the changes
  • 22. Pushing/Pulling to other remote repos Jasonnoble/ event_scheduler your-user-name/ event_scheduler hosh/ event_scheduler Other forks event_scheduler Local Repo upstream origin hosh git push hosh master git pull hosh master Allowed by default Requires permission Remotes: origin upstream hosh
  • 23. Practice makes perfect Find a pair to work with Add their remote repo git remote add _____ git://github….. Fetch refs git fetch _______ Create Branch git checkout --track -b ______ _____/master
  • 24. Practice makes perfect (Cont.) Make some changes, push them to origin/master and have your pair pull those changes Switch roles and you pull changes they’ve pushed Play with the “pull request” feature of GitHub

Editor's Notes

  • #9: This shows you what branch you’re on. It will show what files are staged (none shown here) It will show what files changed (AUTHORS listed here)
  • #18: I like to do this so I have a local branch of the upstream updates.