SlideShare ist ein Scribd-Unternehmen logo
1 von 22
Git, GitHub,How to host your website using
github
• Lesson 1: Version Control
• Lesson 2: Git
• Lesson 3: GitHub
• Lesson 4: How to host your website using github
Club Service Outline
Monday, January 9, 2016
2
• What is version control?
• Why we need version control
• Types of version control
• Popular version control systems
Version Control: Objectives
Monday, January 9, 2016
3
“An application that allows you to record changes to your codebase in a
structured and controlled fashion.”
What is version control?
Monday, January 9, 2016
4
Makes it way easier to undo errors / roll back to earlier versions of code
Why we need Version Control?
Monday, January 9, 2016
5
• Every Client can have a copy of repository to
work offline
• Eg. Git
Distributed Version Control (3rd Generation)
• One Repository is shared within all Client
• Eg. Telnet
Traditional Version Control (2nd Generation)
Types of version control systems
Monday, January 9, 2016
6
• SVN – SubVersioN
• CVS - Concurrent Version System
• Git
• Mercurial
• Bazaar
• LibreSource
Popular version control systems:
Monday, January 9, 2016
7
• What the heck is Git?
• Git Sample Example
• Git Installation
• Git Commands and Practices
Git: Objectives
Monday, January 9, 2016
8
• Git is a version control system.
• It is a best Distributed VCS example.
• Originally developed by Linus Torvalds for the
development of the Linux Kernel in 2005
• Key Points:
▫ Open source, free
▫ Focus on Speed and efficiency
▫ Branching, automatic merging
What is Git?
Monday, January 9, 2016
9
• For WINDOWS:
http://git-scm.com/
• For LINUX:
~(sudo) apt-get install git
Git Installation
Monday, January 9, 2016
10
• Repository : A storage place where all versions of a project are stored.
(local repository refers to a repository on your computer and remote
repository refers to a repository on a server like github.com)
• Cloning : To get a copy of a remote repository to your local computer.
• Fetching : To get latest changes from remote repository without merging
• Pushing : To commit the changes to the remote repository
Git Glossary
Monday, January 9, 2016
11
• Pulling : To get latest changes from remote repository and merge them with
your local repository.
• Commit : To save changes in the local repository
• Checking out : means to get a snapshot of a file or a set of files in a specific
version to your working directory.
• Untracked basically means that Git sees a file you didn’t have in the previous
snapshot (commit);
Git Glossary
Monday, January 9, 2016
12
• Working directory: is a single checkout of one version of the project. These
files are pulled out of the compressed database in the .git directory and
placed on disk for you to use or modify.
• HEAD: refers to a pointer pointing to the currently checked out commit.
Git Glossary
Monday, January 9, 2016
13
• git init
• git help <command>
• git status
• git add
• git commit –m “message”
• git log
• git diff
• git branch <branch-name>
• git checkout <branch-name>
• git merge <branch-name>
Git Commands
Monday, January 9, 2016
14
• What is GitHub?
• Why GitHub?
• Important Links ..
GitHub : Objectives
Monday, January 9, 2016
15
• In simple words GitHub is a code sharing and collaborating platform.
• It’s a Git repository hosting service… but it adds many of its own
features.
• While Git is a command line tool, GitHub provides a web-based
graphical interface
What is GitHub?
Monday, January 9, 2016
16
• By default, all projects are public and free. In you want a private project,
then you have to pay.
• You can clone any public repository, follow projects and developers,
post comments.
Why GitHub
Monday, January 9, 2016
17
• Official Git site
http://git-scm.com
• Git commands
http://gitref.org/basic
• GitHub site
http://github.com
https://github.com/CourseReps/ECEN489-Fall2015/wiki/Git
Important Links:
Monday, January 9, 2016
18
Monday, January 9, 2016
19
1. Create new repository by clicking on new repository button
2. Give repository name as “your_username.github.io”. For e.g. In my case as shown
3. Click on create repository.
How to host your website using github
Monday, January 9, 2016
20
4. Now go to directory where you want to place your website files. For e.g. say
D:GITHUBMYWEBSITE and right click and select open “Git Bash Here”
5. Give command : git clone https://github.com/<username>/<username>.github.io
5. This will create folder of <username>.github.io. Add all files(.html,css,js) for
your website into this folder
How to host your website using github(continued)
Monday, January 9, 2016
21
How to host your website using github(continued)
6. After adding files give command:
> git add .
> git commit –m “first commit”
> git push origin master
7. That’s it..!! Now go to url
“https://<username>.github.io”
Monday, January 9, 2016
22
Thank You!

Weitere ähnliche Inhalte

Was ist angesagt? (20)

Git and Github slides.pdf
Git and Github slides.pdfGit and Github slides.pdf
Git and Github slides.pdf
 
Git and github 101
Git and github 101Git and github 101
Git and github 101
 
Git slides
Git slidesGit slides
Git slides
 
Github
GithubGithub
Github
 
Git n git hub
Git n git hubGit n git hub
Git n git hub
 
Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1
 
Git - Basic Crash Course
Git - Basic Crash CourseGit - Basic Crash Course
Git - Basic Crash Course
 
git and github
git and githubgit and github
git and github
 
Git and Github
Git and GithubGit and Github
Git and Github
 
Git Lab Introduction
Git Lab IntroductionGit Lab Introduction
Git Lab Introduction
 
A prentation on github
A prentation on githubA prentation on github
A prentation on github
 
Git and git workflow best practice
Git and git workflow best practiceGit and git workflow best practice
Git and git workflow best practice
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Introduction to Github Actions
Introduction to Github ActionsIntroduction to Github Actions
Introduction to Github Actions
 
Git real slides
Git real slidesGit real slides
Git real slides
 
Git - An Introduction
Git - An IntroductionGit - An Introduction
Git - An Introduction
 
Intro to Git, GitHub, and BitBucket
Intro to Git, GitHub, and BitBucketIntro to Git, GitHub, and BitBucket
Intro to Git, GitHub, and BitBucket
 
Git 101 for Beginners
Git 101 for Beginners Git 101 for Beginners
Git 101 for Beginners
 
Git training v10
Git training v10Git training v10
Git training v10
 
Intro to git and git hub
Intro to git and git hubIntro to git and git hub
Intro to git and git hub
 

Ähnlich wie Git,Github,How to host using Github

Git for folk who like GUIs
Git for folk who like GUIsGit for folk who like GUIs
Git for folk who like GUIsTim Osborn
 
Quick and easy way to get started with Git & GitHub
Quick and easy way to get started with Git & GitHubQuick and easy way to get started with Git & GitHub
Quick and easy way to get started with Git & GitHubAshoka R K T
 
The Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubThe Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubBigBlueHat
 
Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configurationKishor Kumar
 
ePOM - Fundamentals of Research Software Development - Code Version Control
ePOM - Fundamentals of Research Software Development - Code Version ControlePOM - Fundamentals of Research Software Development - Code Version Control
ePOM - Fundamentals of Research Software Development - Code Version ControlGiuseppe Masetti
 
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)Ahmed El-Arabawy
 
Hacktoberfest 2020 - Open source for beginners
Hacktoberfest 2020 - Open source for beginnersHacktoberfest 2020 - Open source for beginners
Hacktoberfest 2020 - Open source for beginnersDeepikaRana30
 
Introduction to Git for Network Engineers
Introduction to Git for Network EngineersIntroduction to Git for Network Engineers
Introduction to Git for Network EngineersJoel W. King
 
Using Git and BitBucket
Using Git and BitBucketUsing Git and BitBucket
Using Git and BitBucketMedhat Dawoud
 
Bitbucket as a code server and pmt
Bitbucket as a code server and pmt Bitbucket as a code server and pmt
Bitbucket as a code server and pmt malike4u
 
Let's Git this Party Started: An Introduction to Git and GitHub
Let's Git this Party Started: An Introduction to Git and GitHubLet's Git this Party Started: An Introduction to Git and GitHub
Let's Git this Party Started: An Introduction to Git and GitHubKim Moir
 

Ähnlich wie Git,Github,How to host using Github (20)

Git_Git_Lab_1664715263.pdf
Git_Git_Lab_1664715263.pdfGit_Git_Lab_1664715263.pdf
Git_Git_Lab_1664715263.pdf
 
Git for folk who like GUIs
Git for folk who like GUIsGit for folk who like GUIs
Git for folk who like GUIs
 
Migrating To GitHub
Migrating To GitHub  Migrating To GitHub
Migrating To GitHub
 
Quick and easy way to get started with Git & GitHub
Quick and easy way to get started with Git & GitHubQuick and easy way to get started with Git & GitHub
Quick and easy way to get started with Git & GitHub
 
The Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubThe Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHub
 
Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configuration
 
ePOM - Fundamentals of Research Software Development - Code Version Control
ePOM - Fundamentals of Research Software Development - Code Version ControlePOM - Fundamentals of Research Software Development - Code Version Control
ePOM - Fundamentals of Research Software Development - Code Version Control
 
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)
 
Hacktoberfest 2020 - Open source for beginners
Hacktoberfest 2020 - Open source for beginnersHacktoberfest 2020 - Open source for beginners
Hacktoberfest 2020 - Open source for beginners
 
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 and GitHub Info Session
Git and GitHub Info SessionGit and GitHub Info Session
Git and GitHub Info Session
 
Git tutorial
Git tutorialGit tutorial
Git tutorial
 
GitHub Workflows for Technical Communication
GitHub Workflows for Technical CommunicationGitHub Workflows for Technical Communication
GitHub Workflows for Technical Communication
 
Introduction to Git for Network Engineers
Introduction to Git for Network EngineersIntroduction to Git for Network Engineers
Introduction to Git for Network Engineers
 
Version control
Version controlVersion control
Version control
 
Advance workshop on git
Advance workshop on gitAdvance workshop on git
Advance workshop on git
 
Using Git and BitBucket
Using Git and BitBucketUsing Git and BitBucket
Using Git and BitBucket
 
Version control
Version controlVersion control
Version control
 
Bitbucket as a code server and pmt
Bitbucket as a code server and pmt Bitbucket as a code server and pmt
Bitbucket as a code server and pmt
 
Let's Git this Party Started: An Introduction to Git and GitHub
Let's Git this Party Started: An Introduction to Git and GitHubLet's Git this Party Started: An Introduction to Git and GitHub
Let's Git this Party Started: An Introduction to Git and GitHub
 

Mehr von Sujata Regoti

Social media connecting or disconnecting
Social media connecting or disconnectingSocial media connecting or disconnecting
Social media connecting or disconnectingSujata Regoti
 
Servlet and jsp interview questions
Servlet and jsp interview questionsServlet and jsp interview questions
Servlet and jsp interview questionsSujata Regoti
 
Technical aptitude test 2 CSE
Technical aptitude test 2 CSETechnical aptitude test 2 CSE
Technical aptitude test 2 CSESujata Regoti
 
Technical aptitude Test 1 CSE
Technical aptitude Test 1 CSETechnical aptitude Test 1 CSE
Technical aptitude Test 1 CSESujata Regoti
 

Mehr von Sujata Regoti (9)

Social media connecting or disconnecting
Social media connecting or disconnectingSocial media connecting or disconnecting
Social media connecting or disconnecting
 
Image retrieval
Image retrievalImage retrieval
Image retrieval
 
Key management
Key managementKey management
Key management
 
Web mining tools
Web mining toolsWeb mining tools
Web mining tools
 
Servlet and jsp interview questions
Servlet and jsp interview questionsServlet and jsp interview questions
Servlet and jsp interview questions
 
Technical aptitude test 2 CSE
Technical aptitude test 2 CSETechnical aptitude test 2 CSE
Technical aptitude test 2 CSE
 
Technical aptitude Test 1 CSE
Technical aptitude Test 1 CSETechnical aptitude Test 1 CSE
Technical aptitude Test 1 CSE
 
Big Data
Big DataBig Data
Big Data
 
Inflation measuring
Inflation measuringInflation measuring
Inflation measuring
 

Kürzlich hochgeladen

Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 

Kürzlich hochgeladen (20)

Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 

Git,Github,How to host using Github

  • 1. Git, GitHub,How to host your website using github
  • 2. • Lesson 1: Version Control • Lesson 2: Git • Lesson 3: GitHub • Lesson 4: How to host your website using github Club Service Outline Monday, January 9, 2016 2
  • 3. • What is version control? • Why we need version control • Types of version control • Popular version control systems Version Control: Objectives Monday, January 9, 2016 3
  • 4. “An application that allows you to record changes to your codebase in a structured and controlled fashion.” What is version control? Monday, January 9, 2016 4
  • 5. Makes it way easier to undo errors / roll back to earlier versions of code Why we need Version Control? Monday, January 9, 2016 5
  • 6. • Every Client can have a copy of repository to work offline • Eg. Git Distributed Version Control (3rd Generation) • One Repository is shared within all Client • Eg. Telnet Traditional Version Control (2nd Generation) Types of version control systems Monday, January 9, 2016 6
  • 7. • SVN – SubVersioN • CVS - Concurrent Version System • Git • Mercurial • Bazaar • LibreSource Popular version control systems: Monday, January 9, 2016 7
  • 8. • What the heck is Git? • Git Sample Example • Git Installation • Git Commands and Practices Git: Objectives Monday, January 9, 2016 8
  • 9. • Git is a version control system. • It is a best Distributed VCS example. • Originally developed by Linus Torvalds for the development of the Linux Kernel in 2005 • Key Points: ▫ Open source, free ▫ Focus on Speed and efficiency ▫ Branching, automatic merging What is Git? Monday, January 9, 2016 9
  • 10. • For WINDOWS: http://git-scm.com/ • For LINUX: ~(sudo) apt-get install git Git Installation Monday, January 9, 2016 10
  • 11. • Repository : A storage place where all versions of a project are stored. (local repository refers to a repository on your computer and remote repository refers to a repository on a server like github.com) • Cloning : To get a copy of a remote repository to your local computer. • Fetching : To get latest changes from remote repository without merging • Pushing : To commit the changes to the remote repository Git Glossary Monday, January 9, 2016 11
  • 12. • Pulling : To get latest changes from remote repository and merge them with your local repository. • Commit : To save changes in the local repository • Checking out : means to get a snapshot of a file or a set of files in a specific version to your working directory. • Untracked basically means that Git sees a file you didn’t have in the previous snapshot (commit); Git Glossary Monday, January 9, 2016 12
  • 13. • Working directory: is a single checkout of one version of the project. These files are pulled out of the compressed database in the .git directory and placed on disk for you to use or modify. • HEAD: refers to a pointer pointing to the currently checked out commit. Git Glossary Monday, January 9, 2016 13
  • 14. • git init • git help <command> • git status • git add • git commit –m “message” • git log • git diff • git branch <branch-name> • git checkout <branch-name> • git merge <branch-name> Git Commands Monday, January 9, 2016 14
  • 15. • What is GitHub? • Why GitHub? • Important Links .. GitHub : Objectives Monday, January 9, 2016 15
  • 16. • In simple words GitHub is a code sharing and collaborating platform. • It’s a Git repository hosting service… but it adds many of its own features. • While Git is a command line tool, GitHub provides a web-based graphical interface What is GitHub? Monday, January 9, 2016 16
  • 17. • By default, all projects are public and free. In you want a private project, then you have to pay. • You can clone any public repository, follow projects and developers, post comments. Why GitHub Monday, January 9, 2016 17
  • 18. • Official Git site http://git-scm.com • Git commands http://gitref.org/basic • GitHub site http://github.com https://github.com/CourseReps/ECEN489-Fall2015/wiki/Git Important Links: Monday, January 9, 2016 18
  • 19. Monday, January 9, 2016 19 1. Create new repository by clicking on new repository button 2. Give repository name as “your_username.github.io”. For e.g. In my case as shown 3. Click on create repository. How to host your website using github
  • 20. Monday, January 9, 2016 20 4. Now go to directory where you want to place your website files. For e.g. say D:GITHUBMYWEBSITE and right click and select open “Git Bash Here” 5. Give command : git clone https://github.com/<username>/<username>.github.io 5. This will create folder of <username>.github.io. Add all files(.html,css,js) for your website into this folder How to host your website using github(continued)
  • 21. Monday, January 9, 2016 21 How to host your website using github(continued) 6. After adding files give command: > git add . > git commit –m “first commit” > git push origin master 7. That’s it..!! Now go to url “https://<username>.github.io”
  • 22. Monday, January 9, 2016 22 Thank You!

Hinweis der Redaktion

  1. Lesson descriptions should be brief.
  2. Example objectives At the end of this lesson, you will be able to: Save files to the team Web server. Move files to different locations on the team Web server. Share files on the team Web server.