SlideShare ist ein Scribd-Unternehmen logo
1 von 22
an introduction
See: Resources
A Free and open source distributed
version control system designed to
handle everything from small to very
large projects with speed and efficiency.
Created by Linus Torvalds.
If you are not distributed, you
      are not worth using


                       Linus Torvalds
If you perform badly, you are not
           worth using


                       Linus Torvalds
If you cannot guarantee that
  what I check in, checks out
exactly the same way, you are
        not worth using

                     Linus Torvalds
• Distributed: no need to access a central server in order to use
 version control. Every revision is tracked locally. Every Git workspace is a full
 blown version control system


• Offline: users can commit/diff and do everything offline


• Merging and Branching: core of Git. Performant


• Fault-tolerant: no single point of failure
• You cannot do partial checkouts (partial clones)


• Windows support is not as great as other for OS.


• No “latest version”. Git uses hashes which are unreadable for humans


• No global revision numbers.
• Windows executable
  – http://git-scm.com/download/win
• Linux:
  – http://git-scm.com/download/linux
• Mac:
  – http://git-scm.com/download/mac
  – http://www.macports.org/
• Everyone has a local sandbox, you have your own copy of the repo


• It works offline


• It’s fast, performance built from the core


• It handles changes well, branching and merging is core


• Does not track empty folders
– Status = working tree status
– Push = update remote refs + objs
– Fetch = download remote refs + objs
– pull = fetch + merge
– Init = create empty git repo
– Commit = record changes to repo
– Add = add to index
– Diff = show changes between commits and working directories
– Merge = join 2+ dev histories
– Clone = gives you a complete copy of that repo on your system
– Branch = list/create/delete branches
– Tag = list/create/delete tags
                             …and much more
> git clone <repo-name>
> git remote add upstream <repo-name>
> mkdir src
> touch main.py
> git add –A
> git commit –am “New source directory”
> git push upstream master
# navigate to repo home directory
> touch “.gitignore”
# add file extension you with to ignore
#add:
        # Files to exclude #
        ###################
        *.txt   # exclude text files
   *.orig # exclude merge backups

> touch ABOUT.txt
> git add –A ; git commit –am “New Text file”
> git push upstream master # No changes made to repo
# Move file
> git add –A
> git commit –am “Moving file”
> git push upstream master
# Add command aliases to facilitate day to day routines.
# Single command:
> git config --global alias.alias command
# User’s directory, create “.gitconfig” file. Example:
         [alias]
            ac = !git add -A && git commit
# To verify:
> git config --list
# Github does not support direct shell access
# Must use the Github api:
> curl -u ’<username>' https://api.github.com/user/repos -d '{"name":”<repo-name>"}’


# Set up SSH keys with github, then:
> git remote add origin git@github.com:<username>/<rep-name>.git
> git push –u origin master ## requires SSH to be added
• On fork1 make change and push to master branch
• Before merging in fork2, make a change on same line, commit it, and try
  to push to master -> rejected
• Try git pull
• To view change: git diff HEAD
• Resolve merge with git mergetool (opendiff) -> pick change in fork2
• Power command: git ac “Resolve conflict”
• Use git config --global mergetool.keepBackup false to remove .orig files
  or add them to .gitignore
• git pull on fork1 and merge changes
• https://help.github.com/articles/fork-a-repo
• http://gitref.org/remotes/#push
• https://help.github.com/
• http://www.youtube.com/watch?v=4XpnKHJAok8
• http://www.youtube.com/watch?v=_yQlKEq-Ueg
• http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/
• http://betterexplained.com/articles/a-visual-guide-to-version-control/
• http://git.or.cz/course/svn.html
• http://oli.jp/2012/git-powerup/

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Git 101 for Beginners
Git 101 for Beginners Git 101 for Beginners
Git 101 for Beginners
 
git and github
git and githubgit and github
git and github
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 
Git basics
Git basicsGit basics
Git basics
 
Github basics
Github basicsGithub basics
Github basics
 
Mini git tutorial
Mini git tutorialMini git tutorial
Mini git tutorial
 
Introduction git
Introduction gitIntroduction git
Introduction git
 
Git basics
Git basicsGit basics
Git basics
 
Git for a newbie
Git for a newbieGit for a newbie
Git for a newbie
 
Git Tutorial
Git TutorialGit Tutorial
Git Tutorial
 
From svn to git
From svn to gitFrom svn to git
From svn to git
 
Git101
Git101Git101
Git101
 
Git - An Introduction
Git - An IntroductionGit - An Introduction
Git - An Introduction
 
Git and github 101
Git and github 101Git and github 101
Git and github 101
 
Github
GithubGithub
Github
 
GIT | Distributed Version Control System
GIT | Distributed Version Control SystemGIT | Distributed Version Control System
GIT | Distributed Version Control System
 
Git real slides
Git real slidesGit real slides
Git real slides
 
Intro to Git and GitHub
Intro to Git and GitHubIntro to Git and GitHub
Intro to Git and GitHub
 
Intro to Git and GitHub
Intro to Git and GitHubIntro to Git and GitHub
Intro to Git and GitHub
 
The everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitThe everyday developer's guide to version control with Git
The everyday developer's guide to version control with Git
 

Andere mochten auch

Immigration solicitors in london
Immigration solicitors in londonImmigration solicitors in london
Immigration solicitors in london
Venkat Bandla
 
Strategic ERP Solution Management Centre Model
Strategic ERP Solution Management Centre ModelStrategic ERP Solution Management Centre Model
Strategic ERP Solution Management Centre Model
AlexNelson23
 
Propuestas metodologicas miercoles 19
Propuestas metodologicas miercoles 19Propuestas metodologicas miercoles 19
Propuestas metodologicas miercoles 19
Malejandra Duran
 
Cronograma financeiro 2015-06-25_09_45_51
Cronograma financeiro 2015-06-25_09_45_51Cronograma financeiro 2015-06-25_09_45_51
Cronograma financeiro 2015-06-25_09_45_51
Francis Zeman
 
Data mining process powerpoint presentation templates
Data mining process powerpoint presentation templatesData mining process powerpoint presentation templates
Data mining process powerpoint presentation templates
SlideTeam.net
 
Database Consolidation using the Oracle Multitenant Architecture
Database Consolidation using the Oracle Multitenant ArchitectureDatabase Consolidation using the Oracle Multitenant Architecture
Database Consolidation using the Oracle Multitenant Architecture
Pini Dibask
 
Declaring friend function with inline code
Declaring friend function with inline codeDeclaring friend function with inline code
Declaring friend function with inline code
Rajeev Sharan
 

Andere mochten auch (20)

Immigration solicitors in london
Immigration solicitors in londonImmigration solicitors in london
Immigration solicitors in london
 
Strategic ERP Solution Management Centre Model
Strategic ERP Solution Management Centre ModelStrategic ERP Solution Management Centre Model
Strategic ERP Solution Management Centre Model
 
Taller recuperacion final septimo
Taller recuperacion final septimoTaller recuperacion final septimo
Taller recuperacion final septimo
 
Ensuring Data Protection Using Oracle Flashback Features
Ensuring Data Protection Using Oracle Flashback FeaturesEnsuring Data Protection Using Oracle Flashback Features
Ensuring Data Protection Using Oracle Flashback Features
 
Propuestas metodologicas miercoles 19
Propuestas metodologicas miercoles 19Propuestas metodologicas miercoles 19
Propuestas metodologicas miercoles 19
 
Portfolio of "Oscar Design"
Portfolio of "Oscar Design"Portfolio of "Oscar Design"
Portfolio of "Oscar Design"
 
Cronograma financeiro 2015-06-25_09_45_51
Cronograma financeiro 2015-06-25_09_45_51Cronograma financeiro 2015-06-25_09_45_51
Cronograma financeiro 2015-06-25_09_45_51
 
Nivelacion sexto
Nivelacion sextoNivelacion sexto
Nivelacion sexto
 
(01) Fábrica de ídolos - pdf
(01) Fábrica de ídolos - pdf(01) Fábrica de ídolos - pdf
(01) Fábrica de ídolos - pdf
 
Announcing Amazon Lightsail - January 2017 AWS Online Tech Talks
Announcing Amazon Lightsail - January 2017 AWS Online Tech TalksAnnouncing Amazon Lightsail - January 2017 AWS Online Tech Talks
Announcing Amazon Lightsail - January 2017 AWS Online Tech Talks
 
Data mining process powerpoint presentation templates
Data mining process powerpoint presentation templatesData mining process powerpoint presentation templates
Data mining process powerpoint presentation templates
 
Certificados Locutor Acta 16
Certificados Locutor Acta 16Certificados Locutor Acta 16
Certificados Locutor Acta 16
 
Behat: Beyond the Basics
Behat: Beyond the BasicsBehat: Beyond the Basics
Behat: Beyond the Basics
 
Building a Multi-tenanted SaaS with Node.js
Building a Multi-tenanted SaaS with Node.jsBuilding a Multi-tenanted SaaS with Node.js
Building a Multi-tenanted SaaS with Node.js
 
Nivea case Study
Nivea case StudyNivea case Study
Nivea case Study
 
268 let it pass poem
268 let it pass poem268 let it pass poem
268 let it pass poem
 
Tomorrow Marketer 03 - Insights
Tomorrow Marketer 03 - InsightsTomorrow Marketer 03 - Insights
Tomorrow Marketer 03 - Insights
 
Database Consolidation using the Oracle Multitenant Architecture
Database Consolidation using the Oracle Multitenant ArchitectureDatabase Consolidation using the Oracle Multitenant Architecture
Database Consolidation using the Oracle Multitenant Architecture
 
Declaring friend function with inline code
Declaring friend function with inline codeDeclaring friend function with inline code
Declaring friend function with inline code
 
Navegadores fenícios e conquistadores persas
Navegadores fenícios e conquistadores persasNavegadores fenícios e conquistadores persas
Navegadores fenícios e conquistadores persas
 

Ähnlich wie Luis atencio on_git

Source Code Management with Git
Source Code Management with GitSource Code Management with Git
Source Code Management with Git
Things Lab
 

Ähnlich wie Luis atencio on_git (20)

Source Code Management with Git
Source Code Management with GitSource Code Management with Git
Source Code Management with Git
 
CSE 390 Lecture 9 - Version Control with GIT
CSE 390 Lecture 9 - Version Control with GITCSE 390 Lecture 9 - Version Control with GIT
CSE 390 Lecture 9 - Version Control with GIT
 
Git 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using GitGit 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using Git
 
Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configuration
 
Mini-training: Let’s Git It!
Mini-training: Let’s Git It!Mini-training: Let’s Git It!
Mini-training: Let’s Git It!
 
git.ppt.pdf
git.ppt.pdfgit.ppt.pdf
git.ppt.pdf
 
Introduction to Git and GitHub
Introduction to Git and GitHubIntroduction to Git and GitHub
Introduction to Git and GitHub
 
Introduction to Git and Github
Introduction to Git and Github Introduction to Git and Github
Introduction to Git and Github
 
Git introduction
Git introductionGit introduction
Git introduction
 
GIT.pptx
GIT.pptxGIT.pptx
GIT.pptx
 
GitHub Event.pptx
GitHub Event.pptxGitHub Event.pptx
GitHub Event.pptx
 
Git hub
Git hubGit hub
Git hub
 
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
 
Version Control Systems -- Git -- Part I
Version Control Systems -- Git -- Part IVersion Control Systems -- Git -- Part I
Version Control Systems -- Git -- Part I
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
Git Heaven with Wakanda
Git Heaven with WakandaGit Heaven with Wakanda
Git Heaven with Wakanda
 
Git presentation to some coworkers some time ago
Git presentation to some coworkers some time agoGit presentation to some coworkers some time ago
Git presentation to some coworkers some time ago
 
GIT INTRODUCTION
GIT INTRODUCTIONGIT INTRODUCTION
GIT INTRODUCTION
 
Gitgithub101slideshare 150922131830-lva1-app6891
Gitgithub101slideshare 150922131830-lva1-app6891Gitgithub101slideshare 150922131830-lva1-app6891
Gitgithub101slideshare 150922131830-lva1-app6891
 
Introduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech ArticleIntroduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech Article
 

Mehr von Luis Atencio

379008-rc217-functionalprogramming
379008-rc217-functionalprogramming379008-rc217-functionalprogramming
379008-rc217-functionalprogramming
Luis Atencio
 

Mehr von Luis Atencio (8)

Functional programming for the Advanced Beginner
Functional programming for the Advanced BeginnerFunctional programming for the Advanced Beginner
Functional programming for the Advanced Beginner
 
379008-rc217-functionalprogramming
379008-rc217-functionalprogramming379008-rc217-functionalprogramming
379008-rc217-functionalprogramming
 
DZone_RC_RxJS
DZone_RC_RxJSDZone_RC_RxJS
DZone_RC_RxJS
 
PHP = PHunctional Programming
PHP = PHunctional ProgrammingPHP = PHunctional Programming
PHP = PHunctional Programming
 
Luis Atencio on RxJS
Luis Atencio on RxJSLuis Atencio on RxJS
Luis Atencio on RxJS
 
Thinking Functionally with JavaScript
Thinking Functionally with JavaScriptThinking Functionally with JavaScript
Thinking Functionally with JavaScript
 
Functional Programming in JavaScript by Luis Atencio
Functional Programming in JavaScript by Luis AtencioFunctional Programming in JavaScript by Luis Atencio
Functional Programming in JavaScript by Luis Atencio
 
Java script Techniques Part I
Java script Techniques Part IJava script Techniques Part I
Java script Techniques Part I
 

Kürzlich hochgeladen

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Kürzlich hochgeladen (20)

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 

Luis atencio on_git

  • 3. A Free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Created by Linus Torvalds.
  • 4. If you are not distributed, you are not worth using Linus Torvalds
  • 5. If you perform badly, you are not worth using Linus Torvalds
  • 6. If you cannot guarantee that what I check in, checks out exactly the same way, you are not worth using Linus Torvalds
  • 7.
  • 8.
  • 9.
  • 10. • Distributed: no need to access a central server in order to use version control. Every revision is tracked locally. Every Git workspace is a full blown version control system • Offline: users can commit/diff and do everything offline • Merging and Branching: core of Git. Performant • Fault-tolerant: no single point of failure
  • 11. • You cannot do partial checkouts (partial clones) • Windows support is not as great as other for OS. • No “latest version”. Git uses hashes which are unreadable for humans • No global revision numbers.
  • 12. • Windows executable – http://git-scm.com/download/win • Linux: – http://git-scm.com/download/linux • Mac: – http://git-scm.com/download/mac – http://www.macports.org/
  • 13. • Everyone has a local sandbox, you have your own copy of the repo • It works offline • It’s fast, performance built from the core • It handles changes well, branching and merging is core • Does not track empty folders
  • 14. – Status = working tree status – Push = update remote refs + objs – Fetch = download remote refs + objs – pull = fetch + merge – Init = create empty git repo – Commit = record changes to repo – Add = add to index – Diff = show changes between commits and working directories – Merge = join 2+ dev histories – Clone = gives you a complete copy of that repo on your system – Branch = list/create/delete branches – Tag = list/create/delete tags …and much more
  • 15.
  • 16. > git clone <repo-name> > git remote add upstream <repo-name> > mkdir src > touch main.py > git add –A > git commit –am “New source directory” > git push upstream master
  • 17. # navigate to repo home directory > touch “.gitignore” # add file extension you with to ignore #add: # Files to exclude # ################### *.txt # exclude text files *.orig # exclude merge backups > touch ABOUT.txt > git add –A ; git commit –am “New Text file” > git push upstream master # No changes made to repo
  • 18. # Move file > git add –A > git commit –am “Moving file” > git push upstream master
  • 19. # Add command aliases to facilitate day to day routines. # Single command: > git config --global alias.alias command # User’s directory, create “.gitconfig” file. Example: [alias] ac = !git add -A && git commit # To verify: > git config --list
  • 20. # Github does not support direct shell access # Must use the Github api: > curl -u ’<username>' https://api.github.com/user/repos -d '{"name":”<repo-name>"}’ # Set up SSH keys with github, then: > git remote add origin git@github.com:<username>/<rep-name>.git > git push –u origin master ## requires SSH to be added
  • 21. • On fork1 make change and push to master branch • Before merging in fork2, make a change on same line, commit it, and try to push to master -> rejected • Try git pull • To view change: git diff HEAD • Resolve merge with git mergetool (opendiff) -> pick change in fork2 • Power command: git ac “Resolve conflict” • Use git config --global mergetool.keepBackup false to remove .orig files or add them to .gitignore • git pull on fork1 and merge changes
  • 22. • https://help.github.com/articles/fork-a-repo • http://gitref.org/remotes/#push • https://help.github.com/ • http://www.youtube.com/watch?v=4XpnKHJAok8 • http://www.youtube.com/watch?v=_yQlKEq-Ueg • http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/ • http://betterexplained.com/articles/a-visual-guide-to-version-control/ • http://git.or.cz/course/svn.html • http://oli.jp/2012/git-powerup/

Hinweis der Redaktion

  1. TDE - Welcome everyone