SlideShare a Scribd company logo
 
Remote repos process (single committer) Public Repo Located on Server (Github) Private Repo Located on your local machine git push  Make file changes Stage Changes Commit Changes git add filename git commit -m ‘…’ vi filename
Remote repos process (multiple committers) Public Repo Located on Server (Github) Private Repo Located on your local machine 1) git push  Make file changes Stage Changes Commit Changes git add filename git commit -m ‘…’ vi filename Bob’s Private Repo Located on Bob’s local machine 2) git pull
Remote repos process (multiple committers) Public Repo Located on Server (Github) Private Repo Located on your local machine 2) git pull  Bob’s Private Repo Located on Bob’s local machine Make file changes Stage Changes Commit Changes git add filename git commit -m ‘…’ vi filename 1) git push
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
Open source 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
Your project on GitHub http://github.com/your-user-name/event_scheduler
Clone your Repo git clone  git@github.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
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
Modify a file vi (or your favorite editor) AUTHORS Add your name Save the file Commit the change
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
Pull Requests After you push new code to your forked repo, you can request others pull your requests http://github.com/your-user-name/event_scheduler Click Pull Request Enter a quick message about what you changed Enter receipients All users who have forked upstream are listed Check users as requested
Pull Requests (cont.)

More Related Content

PPT
Git102
PPT
Atlanta Pm Git 101
PPTX
Quick and easy way to get started with Git & GitHub
PDF
A Quick Start - Version Control with Git
PDF
ODP
Mr.Crabs Git workflow
PDF
Pengenalan Git
PDF
Git Workshop
Git102
Atlanta Pm Git 101
Quick and easy way to get started with Git & GitHub
A Quick Start - Version Control with Git
Mr.Crabs Git workflow
Pengenalan Git
Git Workshop

What's hot (20)

PDF
Advance workshop on git
PDF
Introduction to Git for Artists
PPTX
Git tutorial
PPTX
Version control system & how to use git
PDF
Introduction to Git Version Control System
PDF
Git Version Control System
PPTX
From svn to git
KEY
The everyday developer's guide to version control with Git
PPTX
Git first contributions
PDF
Version Control & Git
PDF
Git for beginners
PPTX
Introduction to git and github
PPTX
Git in 10 minutes
PPTX
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
PDF
Version Control System - Git
DOCX
Git github
PPT
Git Cards - Keynote Format
PPTX
Advance workshop on git
Introduction to Git for Artists
Git tutorial
Version control system & how to use git
Introduction to Git Version Control System
Git Version Control System
From svn to git
The everyday developer's guide to version control with Git
Git first contributions
Version Control & Git
Git for beginners
Introduction to git and github
Git in 10 minutes
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Version Control System - Git
Git github
Git Cards - Keynote Format
Ad

Similar to Git Atlrug (20)

PPTX
Bekerja dengan git v2 materi untuk kelas RPL
PDF
Git hub party-20151008
PPTX
Git and GitHub
ODP
Practical git for developers
PPTX
Get your Git on GitHub
PPTX
Git and GitHub Presentation of GDG on Campus UNSTPB
PPTX
Git and GitHub (1).pptx
PPTX
Git and GitHub workshop of GDG on Campus UNSTPB
PPTX
Git and GitHub Workshop of GDG on Campus UNSTPB
PPTX
tech winter break workshop on git &git hub.pptx
PPTX
Git and GitHub Workshop of GDG on Campus UNSTPB
PDF
Git & GitHub WorkShop
PDF
github-actions.pdf
PPTX
Git and github introduction
PPTX
GitHub Event.pptx
PDF
Nina Zakharenko - Introduction to Git - Start SLC 2015
PPTX
Understanding Github and Version Control System.pptx
PDF
git and github
PPT
Git101
PDF
Getting started With GIT
Bekerja dengan git v2 materi untuk kelas RPL
Git hub party-20151008
Git and GitHub
Practical git for developers
Get your Git on GitHub
Git and GitHub Presentation of GDG on Campus UNSTPB
Git and GitHub (1).pptx
Git and GitHub workshop of GDG on Campus UNSTPB
Git and GitHub Workshop of GDG on Campus UNSTPB
tech winter break workshop on git &git hub.pptx
Git and GitHub Workshop of GDG on Campus UNSTPB
Git & GitHub WorkShop
github-actions.pdf
Git and github introduction
GitHub Event.pptx
Nina Zakharenko - Introduction to Git - Start SLC 2015
Understanding Github and Version Control System.pptx
git and github
Git101
Getting started With GIT
Ad

More from Jason Noble (14)

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

Recently uploaded (20)

PDF
cuic standard and advanced reporting.pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Machine learning based COVID-19 study performance prediction
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPT
Teaching material agriculture food technology
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Empathic Computing: Creating Shared Understanding
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
KodekX | Application Modernization Development
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Programs and apps: productivity, graphics, security and other tools
cuic standard and advanced reporting.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Network Security Unit 5.pdf for BCA BBA.
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Machine learning based COVID-19 study performance prediction
The AUB Centre for AI in Media Proposal.docx
Reach Out and Touch Someone: Haptics and Empathic Computing
“AI and Expert System Decision Support & Business Intelligence Systems”
Teaching material agriculture food technology
Diabetes mellitus diagnosis method based random forest with bat algorithm
Empathic Computing: Creating Shared Understanding
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
NewMind AI Weekly Chronicles - August'25 Week I
KodekX | Application Modernization Development
Per capita expenditure prediction using model stacking based on satellite ima...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Unlocking AI with Model Context Protocol (MCP)
Programs and apps: productivity, graphics, security and other tools

Git Atlrug

  • 1.  
  • 2. Remote repos process (single committer) Public Repo Located on Server (Github) Private Repo Located on your local machine git push Make file changes Stage Changes Commit Changes git add filename git commit -m ‘…’ vi filename
  • 3. Remote repos process (multiple committers) Public Repo Located on Server (Github) Private Repo Located on your local machine 1) git push Make file changes Stage Changes Commit Changes git add filename git commit -m ‘…’ vi filename Bob’s Private Repo Located on Bob’s local machine 2) git pull
  • 4. Remote repos process (multiple committers) Public Repo Located on Server (Github) Private Repo Located on your local machine 2) git pull Bob’s Private Repo Located on Bob’s local machine Make file changes Stage Changes Commit Changes git add filename git commit -m ‘…’ vi filename 1) git push
  • 5. 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
  • 6. Open source project on GitHub http://github.com/jasonnoble/event_scheduler Click Fork
  • 7. 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
  • 8. Your project on GitHub http://github.com/your-user-name/event_scheduler
  • 9. Clone your Repo git clone git@github.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
  • 10. 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
  • 11. Add upstream In order to pull updates from other sources, you need to add a remote server
  • 12. 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
  • 13. Create local branch git checkout --track -b upstream-master upstream/master upstream-master is what you will call it locally
  • 14. Pull remote changes git checkout upstream-master git pull pull updates from the remote
  • 15. Show diffs between branches git show-branch
  • 16. 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
  • 17. 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
  • 18. Modify a file vi (or your favorite editor) AUTHORS Add your name Save the file Commit the change
  • 19. 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
  • 20. Git Push Push your changes to GitHub git push origin master
  • 21. Pull Requests After you push new code to your forked repo, you can request others pull your requests http://github.com/your-user-name/event_scheduler Click Pull Request Enter a quick message about what you changed Enter receipients All users who have forked upstream are listed Check users as requested

Editor's Notes

  • #3: The bottom commit loop happens frequently. Pushing the the remote happens “occasionally”
  • #4: You commit a change and push to your public repo Bob can then “pull” your change to his repo
  • #5: Bob commits a change and pushes to your public repo You can then “pull” his change to your local repo
  • #14: I like to do this so I have a local branch of the upstream updates.