SlideShare a Scribd company logo
GIT & GitHub Basics
Pro Stack Academy
www.prostackacademy.com
What is Git?
Git is a distributed version control
system, meaning your local copy of code
is a complete version control repository.
Github
GitHub is 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. It also provides access
control and several collaboration features, such
as a wikis and basic task management tools for
every project.
1. Git & Github Architecture
2. Git & Github Architecture
3. Git & Github Architecture
Gitbucket
GitHub is an open source hosting
services. This provides free repositories
but for utilizing all features, the user
might have to buy the premium package.
GitLab
GitLab is an open source of
self-hosting services. It is free
for every community of
coders.
How to Install the git
Here are the steps to follow to install Git on Windows:
1. Download the executable Git file from git-scm.com/downloads
2. Run the installation file with Administrator rights
3. Choose an appropriate installation location such as C:_toolsgit
4. Install the default components, including Git GUI Here and Git Bash
Here
5. Choose your preferred Git default editor. We recommend Notepad++.
6. Allow Git to be added to the Windows PATH
7. Accept the default line ending conversion for Unix and Windows
compatibility
8. Chose the extra option to enable system caching
9. Click Finish to complete the install.
10. Choose to open a Git Bash shell and start using Git!
1. Images for how to install the git
2. Images for how to install the git
3. Images for how to install the git
4. Images for how to install the git
How to create github account
•Some steps to be followed:
•Go to https://github.com/join in a web browser. You can use any web browser on your computer,
phone, or tablet to join.Some add blockers, including uBlock Origin, prevent GitHub's verification
CAPTCHA puzzle from appearing. For best results, disable your web browser's add blocker when
signing up for GitHub.
•Enter your personal details. In addition to creating a username and entering an email address, you'll
also have to create a password. Your password must be at least 15 characters in length or at least 8
characters with at least one number and lowercase letter.[1]
•Click the green Create an account button. It's below the form.
•Complete the CAPTCHA puzzle. The instructions vary by puzzle, so just follow the on-screen
instructions to confirm that you are a human.
•Click the Choose button for your desired plan. One you select a plan, GitHub will send an email
confirmation message to the address you entered. The plan options are:[2]
•Click the Verify email address button in the message from GitHub. This confirms your email
address and returns you to the sign-up process.
•Review your plan selection and click Continue. You can also choose whether you want to receive
updates from GitHub via email by checking or unchecking the "Send me updates" box.
•Select your preferences and click Submit. GitHub displays a quick survey that can help you tailor
your experience to match what you're looking for. Once you make your selection, you'll be taken to a
screen that allows you to set up your first repository.
Image for how to create the github account
How to create github repository
Steps to Create a repository:
1. In the upper-right corner of any page, use the drop-down
menu, and select New repository.
2. Type a short, memorable name for your repository. ...
3. Optionally, add a description of your repository. ...
4. Choose to make the repository either public or private. ...
5. Select Initialize this repository with a README.
6. Click Create repository.
1. Image for how to create github repository
2. Image for how to create github repository
How to install the Visual Studio Code
1) Navigate to download link https://code.visualstudio.com/download
You can choose the custom 32 bit or 64 bit if you are aware of which
architecture system you are using. If you are not sure then you can
simply click on windows Icon. This would download the VS Code installer to
your machine.
2) Start VS-Code Installation Process: Navigate to the folder where VS-Code
Installer is downloaded and double click on it to kick start the installation
process. Once the installation is started, click Next on the welcome screen.
3) Accept the License Agreement: Go through the license agreement, Click on I
accept the agreement and click Next.
4) Choose Installation Directory: By default, VS-Code is installed
under C:users{username}AppDataLocalProgramsMicrosoft VS Code, but
this default location of installation can be changed by clicking on Browse.
5) Choose Start Menu Folder: By Default, the program’s shortcut will be placed
in the Visual Studio Code folder but this can be changed from this window.
Once done, click on Next.
How to install the Visual Studio Code
6) Choose Additional Options: Various options to choose:
•Create a desktop icon: Upon choosing this option desktop shortcut will be
created, it will be easy for you to launch VS Code next time.
•Add “Open with code” action to Windows Explorer file context menu: This
would allow an option to open a file in VS Code on performing the right click
on the file.
•Add Open with code action to Windows Explorer folder context menu: This
would allow an option to open a folder in VS Code on performing the right
click on the folder.
•Register Code as an editor for supported file types: File supported by VS
Code will be automatically opened in Visual Studio Code editor.
•Add to PATH (available after restart): Visual Studio Code installed directory
path will be added to an environment variable automatically but after the
restart.
•Once you choose options that you need, click on Next to continue the
installation:
How to install the Visual Studio Code
6) Review selected options: Ready to Install screen
will show you things which you chose from the
previous screen, you can review. Change anything if
necessary, else click on Install to begin the installation.
7) Launch the Visual Studio Code: Wait for the
installation to complete and at the end final window
will be displayed. Select Launch VS Code and click
on FInish.
8) Editor Screen Opens: The VS Code IDE is launched
and the editor is now open.
1. Images for how to install the visual studio code
2. Images for how to install the visual studio code
Git Commands
1. git init = git init
2. git clone = git clone /path/to/repository
3. git clone username@host:/path/to/repository
4. git push = git push -u origin master/git push -u origin master
5. git pull = git pull origin master
6. git remote = git remote and origin TestGit
7. git commit = git commit -m "first commit" test.txt/git
commit -m "second commit" test.txt
8. git add = git add test.txt
9. git config --global user.name "Sam Smith"git config --
global user.email sam@example.com
10. Status = git status
Github Interview Questions
1. What is the command you can use to write a
commit message?
The command that is used to write a commit message is
“git commit –a”. The –a on the command line instructs
git to commit the new content of all tracked files that
have been modified. You can use “git add<file>” before
git commit –a if new files need to be committed for the
first time.
Github Interview Questions
2. What is the difference between GIT and SVN?
The difference between GIT and SVN is
a) Git is less preferred for handling extremely large files
or frequently changing binary files while SVN can handle
multiple projects stored in the same repository.
b) GIT does not support ‘commits’ across multiple
branches or tags. Subversion allows the creation of folders
at any location in the repository layout.
c) Gits are unchangeable, while Subversion allows
committers to treat a tag as a branch and to create multiple
revisions under a tag root.
Github Interview Questions
3. What are the advantages of using GIT?
a) Data redundancy and replication
b) High availability
c) Only one.git directory per repository
d) Superior disk utilization and network
performance
e) Collaboration friendly
f) Any sort of projects can use GIT
Github Interview Questions
4. What language is used in GIT?
GIT is fast, and ‘C’ language makes this possible
by reducing the overhead of runtimes associated
with higher languages.
5. What is the function of ‘GIT PUSH’ in GIT?
‘GIT PUSH’ updates remote refs along with
associated objects.
Github Interview Questions
6. What is the function of git clone?
The git clone command creates a copy of
an existing Git repository. To get the copy
of a central repository, ‘cloning’ is the
most common way used by programmers.
Github Interview Questions
7. What is the function of ‘git config’?
The ‘git config’ command is a convenient
way to set configuration options for your
Git installation. Behaviour of a
repository, user info, preferences etc. can
be defined through this command.
Git and git hub basics

More Related Content

PPTX
GIT presentation
PPTX
PPTX
Github basics
PDF
Gitlab ci, cncf.sk
PPTX
Github
PPTX
GitHub Basics - Derek Bable
PPTX
CICD Pipeline Using Github Actions
PPTX
Intro to git and git hub
GIT presentation
Github basics
Gitlab ci, cncf.sk
Github
GitHub Basics - Derek Bable
CICD Pipeline Using Github Actions
Intro to git and git hub

What's hot (20)

PPTX
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
PPTX
Git Lab Introduction
PPTX
Introduction git
PDF
Git basics
PPTX
GitHub Presentation
PPTX
GitLab for CI/CD process
PDF
Intro to Git and GitHub
PPTX
Gitlab CI/CD
PPTX
CI/CD with GitHub Actions
PPTX
Git and GitHub
PDF
Git and Github slides.pdf
PDF
Starting with Git & GitHub
PDF
Introduction to Git
PPTX
Git One Day Training Notes
PPTX
Git & GitLab
PDF
Introduction to GitHub
PDF
Introducing GitLab
PPTX
Git in 10 minutes
PPTX
Introduction to github slideshare
PDF
Git real slides
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Lab Introduction
Introduction git
Git basics
GitHub Presentation
GitLab for CI/CD process
Intro to Git and GitHub
Gitlab CI/CD
CI/CD with GitHub Actions
Git and GitHub
Git and Github slides.pdf
Starting with Git & GitHub
Introduction to Git
Git One Day Training Notes
Git & GitLab
Introduction to GitHub
Introducing GitLab
Git in 10 minutes
Introduction to github slideshare
Git real slides
Ad

Similar to Git and git hub basics (20)

PDF
Github and Git What the fuck is this shit .pdf
PPTX
Introduction to git and Github
PPTX
GIT & Github introduction for beginners
PPTX
Setting up Git.pptx
PPT
391Lecture0909 Vision control of git.ppt
PDF
Git hub
PPT
GIT-FirstPart.ppt
PPT
CSE 390 Lecture 9 - Version Control with GIT
PPT
Git is a distributed version control system .
PDF
Rc094 010d-git 2 - desconocido
PDF
Git Tutorial
PDF
Beginner Workshop for Student Developers - Tratech-presentation.pdf
ODP
Git: be social
PDF
git-commands-cheat-sheet-infopediya-com.pdf
PDF
Getting started With GIT
PPTX
Getting Started with Git: A Primer for SVN and TFS Users
PDF
PPTX
Git 101
PPTX
Introduction to git and github
Github and Git What the fuck is this shit .pdf
Introduction to git and Github
GIT & Github introduction for beginners
Setting up Git.pptx
391Lecture0909 Vision control of git.ppt
Git hub
GIT-FirstPart.ppt
CSE 390 Lecture 9 - Version Control with GIT
Git is a distributed version control system .
Rc094 010d-git 2 - desconocido
Git Tutorial
Beginner Workshop for Student Developers - Tratech-presentation.pdf
Git: be social
git-commands-cheat-sheet-infopediya-com.pdf
Getting started With GIT
Getting Started with Git: A Primer for SVN and TFS Users
Git 101
Introduction to git and github
Ad

Recently uploaded (20)

PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
A systematic review of self-coping strategies used by university students to ...
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
Lesson notes of climatology university.
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PPTX
Pharma ospi slides which help in ospi learning
PDF
01-Introduction-to-Information-Management.pdf
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
RMMM.pdf make it easy to upload and study
PPTX
master seminar digital applications in india
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
GDM (1) (1).pptx small presentation for students
PPTX
Institutional Correction lecture only . . .
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Computing-Curriculum for Schools in Ghana
Final Presentation General Medicine 03-08-2024.pptx
A systematic review of self-coping strategies used by university students to ...
Microbial disease of the cardiovascular and lymphatic systems
Lesson notes of climatology university.
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
Pharma ospi slides which help in ospi learning
01-Introduction-to-Information-Management.pdf
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
102 student loan defaulters named and shamed – Is someone you know on the list?
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
RMMM.pdf make it easy to upload and study
master seminar digital applications in india
Anesthesia in Laparoscopic Surgery in India
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Final Presentation General Medicine 03-08-2024.pptx
GDM (1) (1).pptx small presentation for students
Institutional Correction lecture only . . .
VCE English Exam - Section C Student Revision Booklet
Computing-Curriculum for Schools in Ghana

Git and git hub basics

  • 1. GIT & GitHub Basics Pro Stack Academy www.prostackacademy.com
  • 2. What is Git? Git is a distributed version control system, meaning your local copy of code is a complete version control repository.
  • 3. Github GitHub is 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. It also provides access control and several collaboration features, such as a wikis and basic task management tools for every project.
  • 4. 1. Git & Github Architecture
  • 5. 2. Git & Github Architecture
  • 6. 3. Git & Github Architecture
  • 7. Gitbucket GitHub is an open source hosting services. This provides free repositories but for utilizing all features, the user might have to buy the premium package.
  • 8. GitLab GitLab is an open source of self-hosting services. It is free for every community of coders.
  • 9. How to Install the git Here are the steps to follow to install Git on Windows: 1. Download the executable Git file from git-scm.com/downloads 2. Run the installation file with Administrator rights 3. Choose an appropriate installation location such as C:_toolsgit 4. Install the default components, including Git GUI Here and Git Bash Here 5. Choose your preferred Git default editor. We recommend Notepad++. 6. Allow Git to be added to the Windows PATH 7. Accept the default line ending conversion for Unix and Windows compatibility 8. Chose the extra option to enable system caching 9. Click Finish to complete the install. 10. Choose to open a Git Bash shell and start using Git!
  • 10. 1. Images for how to install the git
  • 11. 2. Images for how to install the git
  • 12. 3. Images for how to install the git
  • 13. 4. Images for how to install the git
  • 14. How to create github account •Some steps to be followed: •Go to https://github.com/join in a web browser. You can use any web browser on your computer, phone, or tablet to join.Some add blockers, including uBlock Origin, prevent GitHub's verification CAPTCHA puzzle from appearing. For best results, disable your web browser's add blocker when signing up for GitHub. •Enter your personal details. In addition to creating a username and entering an email address, you'll also have to create a password. Your password must be at least 15 characters in length or at least 8 characters with at least one number and lowercase letter.[1] •Click the green Create an account button. It's below the form. •Complete the CAPTCHA puzzle. The instructions vary by puzzle, so just follow the on-screen instructions to confirm that you are a human. •Click the Choose button for your desired plan. One you select a plan, GitHub will send an email confirmation message to the address you entered. The plan options are:[2] •Click the Verify email address button in the message from GitHub. This confirms your email address and returns you to the sign-up process. •Review your plan selection and click Continue. You can also choose whether you want to receive updates from GitHub via email by checking or unchecking the "Send me updates" box. •Select your preferences and click Submit. GitHub displays a quick survey that can help you tailor your experience to match what you're looking for. Once you make your selection, you'll be taken to a screen that allows you to set up your first repository.
  • 15. Image for how to create the github account
  • 16. How to create github repository Steps to Create a repository: 1. In the upper-right corner of any page, use the drop-down menu, and select New repository. 2. Type a short, memorable name for your repository. ... 3. Optionally, add a description of your repository. ... 4. Choose to make the repository either public or private. ... 5. Select Initialize this repository with a README. 6. Click Create repository.
  • 17. 1. Image for how to create github repository
  • 18. 2. Image for how to create github repository
  • 19. How to install the Visual Studio Code 1) Navigate to download link https://code.visualstudio.com/download You can choose the custom 32 bit or 64 bit if you are aware of which architecture system you are using. If you are not sure then you can simply click on windows Icon. This would download the VS Code installer to your machine. 2) Start VS-Code Installation Process: Navigate to the folder where VS-Code Installer is downloaded and double click on it to kick start the installation process. Once the installation is started, click Next on the welcome screen. 3) Accept the License Agreement: Go through the license agreement, Click on I accept the agreement and click Next. 4) Choose Installation Directory: By default, VS-Code is installed under C:users{username}AppDataLocalProgramsMicrosoft VS Code, but this default location of installation can be changed by clicking on Browse. 5) Choose Start Menu Folder: By Default, the program’s shortcut will be placed in the Visual Studio Code folder but this can be changed from this window. Once done, click on Next.
  • 20. How to install the Visual Studio Code 6) Choose Additional Options: Various options to choose: •Create a desktop icon: Upon choosing this option desktop shortcut will be created, it will be easy for you to launch VS Code next time. •Add “Open with code” action to Windows Explorer file context menu: This would allow an option to open a file in VS Code on performing the right click on the file. •Add Open with code action to Windows Explorer folder context menu: This would allow an option to open a folder in VS Code on performing the right click on the folder. •Register Code as an editor for supported file types: File supported by VS Code will be automatically opened in Visual Studio Code editor. •Add to PATH (available after restart): Visual Studio Code installed directory path will be added to an environment variable automatically but after the restart. •Once you choose options that you need, click on Next to continue the installation:
  • 21. How to install the Visual Studio Code 6) Review selected options: Ready to Install screen will show you things which you chose from the previous screen, you can review. Change anything if necessary, else click on Install to begin the installation. 7) Launch the Visual Studio Code: Wait for the installation to complete and at the end final window will be displayed. Select Launch VS Code and click on FInish. 8) Editor Screen Opens: The VS Code IDE is launched and the editor is now open.
  • 22. 1. Images for how to install the visual studio code
  • 23. 2. Images for how to install the visual studio code
  • 24. Git Commands 1. git init = git init 2. git clone = git clone /path/to/repository 3. git clone username@host:/path/to/repository 4. git push = git push -u origin master/git push -u origin master 5. git pull = git pull origin master 6. git remote = git remote and origin TestGit 7. git commit = git commit -m "first commit" test.txt/git commit -m "second commit" test.txt 8. git add = git add test.txt 9. git config --global user.name "Sam Smith"git config -- global user.email sam@example.com 10. Status = git status
  • 25. Github Interview Questions 1. What is the command you can use to write a commit message? The command that is used to write a commit message is “git commit –a”. The –a on the command line instructs git to commit the new content of all tracked files that have been modified. You can use “git add<file>” before git commit –a if new files need to be committed for the first time.
  • 26. Github Interview Questions 2. What is the difference between GIT and SVN? The difference between GIT and SVN is a) Git is less preferred for handling extremely large files or frequently changing binary files while SVN can handle multiple projects stored in the same repository. b) GIT does not support ‘commits’ across multiple branches or tags. Subversion allows the creation of folders at any location in the repository layout. c) Gits are unchangeable, while Subversion allows committers to treat a tag as a branch and to create multiple revisions under a tag root.
  • 27. Github Interview Questions 3. What are the advantages of using GIT? a) Data redundancy and replication b) High availability c) Only one.git directory per repository d) Superior disk utilization and network performance e) Collaboration friendly f) Any sort of projects can use GIT
  • 28. Github Interview Questions 4. What language is used in GIT? GIT is fast, and ‘C’ language makes this possible by reducing the overhead of runtimes associated with higher languages. 5. What is the function of ‘GIT PUSH’ in GIT? ‘GIT PUSH’ updates remote refs along with associated objects.
  • 29. Github Interview Questions 6. What is the function of git clone? The git clone command creates a copy of an existing Git repository. To get the copy of a central repository, ‘cloning’ is the most common way used by programmers.
  • 30. Github Interview Questions 7. What is the function of ‘git config’? The ‘git config’ command is a convenient way to set configuration options for your Git installation. Behaviour of a repository, user info, preferences etc. can be defined through this command.