際際滷

際際滷Share a Scribd company logo
Getting Started With
GIT
BY GHADI AL GHOSH
LINKEDIN.COM/IN/GHADIALGHOSH/
GITHUB.COM/GHADIALGHOSH
Introduction
Many Beginners still think Git is a trouble!!!!
This slide is to introduce you to GIT and how it¨s beneficial in managing our
project.
GIT originally developed in 2005 by Linus Torvalds, the famous creator of the
Linux operating system kernel.
What you will learn
?What is Git
? Basic Git Terminology & Common GIT Operations
?Git vs GitHub
?Create Your First Git Local Repository & push it to GitHub
http://jlord.us/git-it/challenges/remote_control.html
What is Git?
One of the primary things that Git does and also the primary reason it exists is to
keep track of the entire history of things that you are working on.
Simply, Git is like a person? who observes your code & remember what you &
your teammate changed, when you changed it & why you changed it.
He (Git) simply keep track of changes!
Basic Git Terminology - 1
?Repository
Now imagine this person keep these changes for each project in different
folders?.
This Folder is called a repository
?Commit, Every Time you change something in your project you can tell
(commit) that person (Git) to remember it with unique ID, so he can tell you
about that change in the future if you need.
Basic Git Terminology - 2
?Branch
For convenience, he keeps these records in a different cabinet, called branch. In
the beginning, there is only one slot called master branch you can tell him to add
more!
Git Operations
?Init-> To initialize a local directory as Git repository
?Push -> To upload changes to your repository
?Pull -> To download any version of a file from a repository
?Clone -> To clone a remote Git repository (GitHub) to a local machine
Git vs GitHub
What is GitHub
GitHub is a platform (an online service) that provides hosting for your projects, it
is called a remote repository because it's on a remote server.
GitHub is also called a remote repository
Git is local (tool) but GitHub is online service
https://www.benfrederickson.com/ranking-programming-languages-by-github-users/
GitHub Ranking
As of January 2020, GitHub reports having over 40 million users and more than
100 million repositories (including at least 28 million public repositories), making
it the largest host of source code in the world.
GitHub is not the only option! other choices include Git Lab and
Bitbucket.
Create your First Git local repository - 1
?Create a sample folder ?named `Demo¨ and place some sample code files in it.
?Create a GitHub Account
If you don't have one you can open an account it is available freely over the
internet ? https://github.com/
Create your First Git local repository - 2
?Make sure you have Git installed on your machine
You can install Git for Windows which provides a BASH emulation used to run Git
from the command line. Personally, I like running Git from the command line, but
it also provides the Git GUI, a powerful alternative to Git BASH.
https://gitforwindows.org/
Create your First Git local repository - 3
?Tell Git who you are
$ git config --global user.name "YOUR_USERNAME"
$ git config --global user.email "YOUREMAIL@domain.com"
$ git config --global --list # To check the info you just provided
Create your First Git local repository - 4
?Let¨s Git
Create a new repository on GitHub.
Follow the below link:
https://github.com/new.
Now, locate to the folder you want to place under git in your PC.
$ cd Desktop/Demo
Create your First Git local repository - 5
?Initialize Git:
$ touch README.md # To create a README file
$ git init # Initiates an empty git repository
now you have successfully created a Git local repository
Add files for commit
?Add the files to the Git repository for commit:
$ git add . # Adds all the files in the local repository and stages them for commit
?Commit files you added to your Git repo:
$ git commit -m "First commit"# The message in the " " is given so that the other
users can read the message and see what changes you made
Add a remote origin and Push - 1
Now each time you make changes in your files and save it, it won¨t be
automatically updated on GitHub. All the changes we made in the file are
updated in the local repository. Now to update the changes to the master:
$ git remote add origin remote_repository_URL# sets the new remote
The git remote command lets you create, view, and delete connections to other
repositories.
Add a remote origin and Push - 2
$ git push -u origin master # pushes changes to origin
Now the git push command pushes the changes in your local repository up to
the remote repository you specified as the origin.
And that¨s it. You¨ve just added the files to the repository you just created on
GitHub.
Q&A
For Any inquires feel free to send me an email at
ghadialghosh[@]outlook.com
Thank You ?

More Related Content

What's hot (20)

Open source
Open sourceOpen source
Open source
onaelmangabo
?
Beginner's guide to git and github
Beginner's guide to git and github Beginner's guide to git and github
Beginner's guide to git and github
SahilSonar4
?
Github
GithubGithub
Github
JaneAlamAdnan
?
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
Yan Vugenfirer
?
Hacktoberfest slides
Hacktoberfest slidesHacktoberfest slides
Hacktoberfest slides
FatimaYousif11
?
Git kelvin
Git   kelvinGit   kelvin
Git kelvin
Kwong Wang Ho
?
Inside GitHub
Inside GitHubInside GitHub
Inside GitHub
err
?
Introduction to git and Github
Introduction to git and GithubIntroduction to git and Github
Introduction to git and Github
Wycliff1
?
How to install and use git
How to install and  use gitHow to install and  use git
How to install and use git
Faysal Hossain Shezan
?
Smile Gupta - Hacktoberfest Celebration 2020
Smile Gupta - Hacktoberfest Celebration 2020Smile Gupta - Hacktoberfest Celebration 2020
Smile Gupta - Hacktoberfest Celebration 2020
Smile Gupta
?
GitHub Classroom - An Open Source Learning Platform by Dr. Anchal Garg
GitHub Classroom - An Open Source Learning Platform by Dr. Anchal GargGitHub Classroom - An Open Source Learning Platform by Dr. Anchal Garg
GitHub Classroom - An Open Source Learning Platform by Dr. Anchal Garg
Nisha Garg
?
Git & git hub
Git & git hubGit & git hub
Git & git hub
PreetikaKanojia
?
Intro to Git & GitHub
Intro to Git & GitHubIntro to Git & GitHub
Intro to Git & GitHub
Google Developer Students Club NIT Silchar
?
Git basics
Git basicsGit basics
Git basics
Padmavathi Tiwari
?
Git hub
Git hubGit hub
Git hub
Umang Gupta
?
GitHub Introduction
GitHub IntroductionGitHub Introduction
GitHub Introduction
VIA Next Innovators
?
Git, GitHub and Open Source
Git, GitHub and Open SourceGit, GitHub and Open Source
Git, GitHub and Open Source
Lorna Mitchell
?
Git & Github
Git & GithubGit & Github
Git & Github
Aman Lalpuria
?
Git hub visualstudiocode
Git hub visualstudiocodeGit hub visualstudiocode
Git hub visualstudiocode
Rolands Krumbergs
?
Contributing to open source using Git
Contributing to open source using GitContributing to open source using Git
Contributing to open source using Git
Yan Vugenfirer
?

Similar to Getting started With GIT (20)

Beginner Workshop for Student Developers - Tratech-presentation.pdf
Beginner Workshop for Student Developers - Tratech-presentation.pdfBeginner Workshop for Student Developers - Tratech-presentation.pdf
Beginner Workshop for Student Developers - Tratech-presentation.pdf
GDSCKNUST
?
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
PRIYATHAMDARISI
?
16 Git
16 Git16 Git
16 Git
Hadley Wickham
?
GIT & Github introduction for beginners
GIT & Github introduction for  beginnersGIT & Github introduction for  beginners
GIT & Github introduction for beginners
riteshsingh3651
?
Introduction to git and github
Introduction to git and githubIntroduction to git and github
Introduction to git and github
Aderemi Dadepo
?
introductiontogitandgithub-120702044048-phpapp01.pdf
introductiontogitandgithub-120702044048-phpapp01.pdfintroductiontogitandgithub-120702044048-phpapp01.pdf
introductiontogitandgithub-120702044048-phpapp01.pdf
BruceLee275640
?
Git Tutorial A Comprehensive Guide for Beginners.pdf
Git Tutorial A Comprehensive Guide for Beginners.pdfGit Tutorial A Comprehensive Guide for Beginners.pdf
Git Tutorial A Comprehensive Guide for Beginners.pdf
uzair
?
Brief tutorial on Git
Brief tutorial on GitBrief tutorial on Git
Brief tutorial on Git
}猟
?
A Tutorial for GitHub.pdf
A Tutorial for GitHub.pdfA Tutorial for GitHub.pdf
A Tutorial for GitHub.pdf
Amarnadh36
?
A Tutorial for GitHub.pdf
A Tutorial for GitHub.pdfA Tutorial for GitHub.pdf
A Tutorial for GitHub.pdf
badrfathallah2
?
Introduction to git hub
Introduction to git hubIntroduction to git hub
Introduction to git hub
Naveen Pandey
?
Git & GitHub 101farwsfrwvnfuvnvjvvv.pptx
Git & GitHub 101farwsfrwvnfuvnvjvvv.pptxGit & GitHub 101farwsfrwvnfuvnvjvvv.pptx
Git & GitHub 101farwsfrwvnfuvnvjvvv.pptx
sihoxe6756
?
setting up a repository using GIT
setting up a repository using GITsetting up a repository using GIT
setting up a repository using GIT
Ashok Kumar Satuluri
?
Git and Github.pptx
Git and Github.pptxGit and Github.pptx
Git and Github.pptx
aymanessam16
?
Git and Github.pptx
Git and Github.pptxGit and Github.pptx
Git and Github.pptx
Hitesh670643
?
Extra bit with git
Extra bit with gitExtra bit with git
Extra bit with git
Himanshu Agrawal
?
GIT By Sivakrishna
GIT By SivakrishnaGIT By Sivakrishna
GIT By Sivakrishna
Nyros Technologies
?
Github and Git What the fuck is this shit .pdf
Github and Git What the fuck is this shit .pdfGithub and Git What the fuck is this shit .pdf
Github and Git What the fuck is this shit .pdf
krishna50blogging
?
Mini-training: Let¨s Git It!
Mini-training: Let¨s Git It!Mini-training: Let¨s Git It!
Mini-training: Let¨s Git It!
Betclic Everest Group Tech Team
?
Intro to Git and GitHub
Intro to Git and GitHubIntro to Git and GitHub
Intro to Git and GitHub
Panagiotis Papadopoulos
?
Beginner Workshop for Student Developers - Tratech-presentation.pdf
Beginner Workshop for Student Developers - Tratech-presentation.pdfBeginner Workshop for Student Developers - Tratech-presentation.pdf
Beginner Workshop for Student Developers - Tratech-presentation.pdf
GDSCKNUST
?
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
PRIYATHAMDARISI
?
GIT & Github introduction for beginners
GIT & Github introduction for  beginnersGIT & Github introduction for  beginners
GIT & Github introduction for beginners
riteshsingh3651
?
Introduction to git and github
Introduction to git and githubIntroduction to git and github
Introduction to git and github
Aderemi Dadepo
?
introductiontogitandgithub-120702044048-phpapp01.pdf
introductiontogitandgithub-120702044048-phpapp01.pdfintroductiontogitandgithub-120702044048-phpapp01.pdf
introductiontogitandgithub-120702044048-phpapp01.pdf
BruceLee275640
?
Git Tutorial A Comprehensive Guide for Beginners.pdf
Git Tutorial A Comprehensive Guide for Beginners.pdfGit Tutorial A Comprehensive Guide for Beginners.pdf
Git Tutorial A Comprehensive Guide for Beginners.pdf
uzair
?
Brief tutorial on Git
Brief tutorial on GitBrief tutorial on Git
Brief tutorial on Git
}猟
?
A Tutorial for GitHub.pdf
A Tutorial for GitHub.pdfA Tutorial for GitHub.pdf
A Tutorial for GitHub.pdf
Amarnadh36
?
A Tutorial for GitHub.pdf
A Tutorial for GitHub.pdfA Tutorial for GitHub.pdf
A Tutorial for GitHub.pdf
badrfathallah2
?
Introduction to git hub
Introduction to git hubIntroduction to git hub
Introduction to git hub
Naveen Pandey
?
Git & GitHub 101farwsfrwvnfuvnvjvvv.pptx
Git & GitHub 101farwsfrwvnfuvnvjvvv.pptxGit & GitHub 101farwsfrwvnfuvnvjvvv.pptx
Git & GitHub 101farwsfrwvnfuvnvjvvv.pptx
sihoxe6756
?
Github and Git What the fuck is this shit .pdf
Github and Git What the fuck is this shit .pdfGithub and Git What the fuck is this shit .pdf
Github and Git What the fuck is this shit .pdf
krishna50blogging
?

Recently uploaded (20)

Least Privilege AWS IAM Role Permissions
Least Privilege AWS IAM Role PermissionsLeast Privilege AWS IAM Role Permissions
Least Privilege AWS IAM Role Permissions
Chris Wahl
?
All-Data, Any-AI Integration: FME & Amazon Bedrock in the Real-World
All-Data, Any-AI Integration: FME & Amazon Bedrock in the Real-WorldAll-Data, Any-AI Integration: FME & Amazon Bedrock in the Real-World
All-Data, Any-AI Integration: FME & Amazon Bedrock in the Real-World
Safe Software
?
AI in Talent Acquisition: Boosting Hiring
AI in Talent Acquisition: Boosting HiringAI in Talent Acquisition: Boosting Hiring
AI in Talent Acquisition: Boosting Hiring
Beyond Chiefs
?
SAP Automation with UiPath: SAP Test Automation - Part 5 of 8
SAP Automation with UiPath: SAP Test Automation - Part 5 of 8SAP Automation with UiPath: SAP Test Automation - Part 5 of 8
SAP Automation with UiPath: SAP Test Automation - Part 5 of 8
DianaGray10
?
Why Outsource Accounting to India A Smart Business Move!.pdf
Why Outsource Accounting to India A Smart Business Move!.pdfWhy Outsource Accounting to India A Smart Business Move!.pdf
Why Outsource Accounting to India A Smart Business Move!.pdf
anjelinajones6811
?
How Telemedicine App Development is Revolutionizing Virtual Care.pptx
How Telemedicine App Development is Revolutionizing Virtual Care.pptxHow Telemedicine App Development is Revolutionizing Virtual Care.pptx
How Telemedicine App Development is Revolutionizing Virtual Care.pptx
Dash Technologies Inc
?
ScotSecure Cyber Security Summit 2025 Edinburgh
ScotSecure Cyber Security Summit 2025 EdinburghScotSecure Cyber Security Summit 2025 Edinburgh
ScotSecure Cyber Security Summit 2025 Edinburgh
Ray Bugg
?
STRING FUNCTIONS IN JAVA BY N SARATH KUMAR
STRING FUNCTIONS IN JAVA BY N SARATH KUMARSTRING FUNCTIONS IN JAVA BY N SARATH KUMAR
STRING FUNCTIONS IN JAVA BY N SARATH KUMAR
Sarathkumar Narsupalli
?
Build Your Uber Clone App with Advanced Features
Build Your Uber Clone App with Advanced FeaturesBuild Your Uber Clone App with Advanced Features
Build Your Uber Clone App with Advanced Features
V3cube
?
Building High-Impact Teams Beyond the Product Triad.pdf
Building High-Impact Teams Beyond the Product Triad.pdfBuilding High-Impact Teams Beyond the Product Triad.pdf
Building High-Impact Teams Beyond the Product Triad.pdf
Rafael Burity
?
State_of_AI_Transformation in Germany.pdf
State_of_AI_Transformation in Germany.pdfState_of_AI_Transformation in Germany.pdf
State_of_AI_Transformation in Germany.pdf
VaradRajanKrishna
?
STARLINK-JIO-AIRTEL Security issues to Ponder
STARLINK-JIO-AIRTEL Security issues to PonderSTARLINK-JIO-AIRTEL Security issues to Ponder
STARLINK-JIO-AIRTEL Security issues to Ponder
anupriti
?
Smarter RAG Pipelines: Scaling Search with Milvus and Feast
Smarter RAG Pipelines: Scaling Search with Milvus and FeastSmarter RAG Pipelines: Scaling Search with Milvus and Feast
Smarter RAG Pipelines: Scaling Search with Milvus and Feast
Zilliz
?
Commit Conf 2025 Bitnami Charts with Kubescape
Commit Conf 2025 Bitnami Charts with KubescapeCommit Conf 2025 Bitnami Charts with Kubescape
Commit Conf 2025 Bitnami Charts with Kubescape
Alfredo Garc┴a Lavilla
?
Top Tips to Get Your Data AI-Ready? ? ?? ?
Top Tips to Get Your Data AI-Ready? ? ?? ?Top Tips to Get Your Data AI-Ready? ? ?? ?
Top Tips to Get Your Data AI-Ready? ? ?? ?
Precisely
?
Scalable Multi-Agent AI with AutoGen by Udai
Scalable Multi-Agent AI with AutoGen by UdaiScalable Multi-Agent AI with AutoGen by Udai
Scalable Multi-Agent AI with AutoGen by Udai
Udaiappa Ramachandran
?
Packaging your App for AppExchange C Managed Vs Unmanaged.pptx
Packaging your App for AppExchange C Managed Vs Unmanaged.pptxPackaging your App for AppExchange C Managed Vs Unmanaged.pptx
Packaging your App for AppExchange C Managed Vs Unmanaged.pptx
mohayyudin7826
?
The effectiveness of ai powered educational tools in enhancing academic perfo...
The effectiveness of ai powered educational tools in enhancing academic perfo...The effectiveness of ai powered educational tools in enhancing academic perfo...
The effectiveness of ai powered educational tools in enhancing academic perfo...
aebhpmqaocxhydmajf
?
The Road to SAP S4HANA Cloud with SAP Activate.pptx
The Road to SAP S4HANA Cloud with SAP Activate.pptxThe Road to SAP S4HANA Cloud with SAP Activate.pptx
The Road to SAP S4HANA Cloud with SAP Activate.pptx
zsbaranyai
?
HHUG-04-2025-Close-more-deals-from-your-existing-pipeline-FOR SLIDESHARE.pptx
HHUG-04-2025-Close-more-deals-from-your-existing-pipeline-FOR SLIDESHARE.pptxHHUG-04-2025-Close-more-deals-from-your-existing-pipeline-FOR SLIDESHARE.pptx
HHUG-04-2025-Close-more-deals-from-your-existing-pipeline-FOR SLIDESHARE.pptx
HampshireHUG
?
Least Privilege AWS IAM Role Permissions
Least Privilege AWS IAM Role PermissionsLeast Privilege AWS IAM Role Permissions
Least Privilege AWS IAM Role Permissions
Chris Wahl
?
All-Data, Any-AI Integration: FME & Amazon Bedrock in the Real-World
All-Data, Any-AI Integration: FME & Amazon Bedrock in the Real-WorldAll-Data, Any-AI Integration: FME & Amazon Bedrock in the Real-World
All-Data, Any-AI Integration: FME & Amazon Bedrock in the Real-World
Safe Software
?
AI in Talent Acquisition: Boosting Hiring
AI in Talent Acquisition: Boosting HiringAI in Talent Acquisition: Boosting Hiring
AI in Talent Acquisition: Boosting Hiring
Beyond Chiefs
?
SAP Automation with UiPath: SAP Test Automation - Part 5 of 8
SAP Automation with UiPath: SAP Test Automation - Part 5 of 8SAP Automation with UiPath: SAP Test Automation - Part 5 of 8
SAP Automation with UiPath: SAP Test Automation - Part 5 of 8
DianaGray10
?
Why Outsource Accounting to India A Smart Business Move!.pdf
Why Outsource Accounting to India A Smart Business Move!.pdfWhy Outsource Accounting to India A Smart Business Move!.pdf
Why Outsource Accounting to India A Smart Business Move!.pdf
anjelinajones6811
?
How Telemedicine App Development is Revolutionizing Virtual Care.pptx
How Telemedicine App Development is Revolutionizing Virtual Care.pptxHow Telemedicine App Development is Revolutionizing Virtual Care.pptx
How Telemedicine App Development is Revolutionizing Virtual Care.pptx
Dash Technologies Inc
?
ScotSecure Cyber Security Summit 2025 Edinburgh
ScotSecure Cyber Security Summit 2025 EdinburghScotSecure Cyber Security Summit 2025 Edinburgh
ScotSecure Cyber Security Summit 2025 Edinburgh
Ray Bugg
?
STRING FUNCTIONS IN JAVA BY N SARATH KUMAR
STRING FUNCTIONS IN JAVA BY N SARATH KUMARSTRING FUNCTIONS IN JAVA BY N SARATH KUMAR
STRING FUNCTIONS IN JAVA BY N SARATH KUMAR
Sarathkumar Narsupalli
?
Build Your Uber Clone App with Advanced Features
Build Your Uber Clone App with Advanced FeaturesBuild Your Uber Clone App with Advanced Features
Build Your Uber Clone App with Advanced Features
V3cube
?
Building High-Impact Teams Beyond the Product Triad.pdf
Building High-Impact Teams Beyond the Product Triad.pdfBuilding High-Impact Teams Beyond the Product Triad.pdf
Building High-Impact Teams Beyond the Product Triad.pdf
Rafael Burity
?
State_of_AI_Transformation in Germany.pdf
State_of_AI_Transformation in Germany.pdfState_of_AI_Transformation in Germany.pdf
State_of_AI_Transformation in Germany.pdf
VaradRajanKrishna
?
STARLINK-JIO-AIRTEL Security issues to Ponder
STARLINK-JIO-AIRTEL Security issues to PonderSTARLINK-JIO-AIRTEL Security issues to Ponder
STARLINK-JIO-AIRTEL Security issues to Ponder
anupriti
?
Smarter RAG Pipelines: Scaling Search with Milvus and Feast
Smarter RAG Pipelines: Scaling Search with Milvus and FeastSmarter RAG Pipelines: Scaling Search with Milvus and Feast
Smarter RAG Pipelines: Scaling Search with Milvus and Feast
Zilliz
?
Commit Conf 2025 Bitnami Charts with Kubescape
Commit Conf 2025 Bitnami Charts with KubescapeCommit Conf 2025 Bitnami Charts with Kubescape
Commit Conf 2025 Bitnami Charts with Kubescape
Alfredo Garc┴a Lavilla
?
Top Tips to Get Your Data AI-Ready? ? ?? ?
Top Tips to Get Your Data AI-Ready? ? ?? ?Top Tips to Get Your Data AI-Ready? ? ?? ?
Top Tips to Get Your Data AI-Ready? ? ?? ?
Precisely
?
Scalable Multi-Agent AI with AutoGen by Udai
Scalable Multi-Agent AI with AutoGen by UdaiScalable Multi-Agent AI with AutoGen by Udai
Scalable Multi-Agent AI with AutoGen by Udai
Udaiappa Ramachandran
?
Packaging your App for AppExchange C Managed Vs Unmanaged.pptx
Packaging your App for AppExchange C Managed Vs Unmanaged.pptxPackaging your App for AppExchange C Managed Vs Unmanaged.pptx
Packaging your App for AppExchange C Managed Vs Unmanaged.pptx
mohayyudin7826
?
The effectiveness of ai powered educational tools in enhancing academic perfo...
The effectiveness of ai powered educational tools in enhancing academic perfo...The effectiveness of ai powered educational tools in enhancing academic perfo...
The effectiveness of ai powered educational tools in enhancing academic perfo...
aebhpmqaocxhydmajf
?
The Road to SAP S4HANA Cloud with SAP Activate.pptx
The Road to SAP S4HANA Cloud with SAP Activate.pptxThe Road to SAP S4HANA Cloud with SAP Activate.pptx
The Road to SAP S4HANA Cloud with SAP Activate.pptx
zsbaranyai
?
HHUG-04-2025-Close-more-deals-from-your-existing-pipeline-FOR SLIDESHARE.pptx
HHUG-04-2025-Close-more-deals-from-your-existing-pipeline-FOR SLIDESHARE.pptxHHUG-04-2025-Close-more-deals-from-your-existing-pipeline-FOR SLIDESHARE.pptx
HHUG-04-2025-Close-more-deals-from-your-existing-pipeline-FOR SLIDESHARE.pptx
HampshireHUG
?

Getting started With GIT

  • 1. Getting Started With GIT BY GHADI AL GHOSH LINKEDIN.COM/IN/GHADIALGHOSH/ GITHUB.COM/GHADIALGHOSH
  • 2. Introduction Many Beginners still think Git is a trouble!!!! This slide is to introduce you to GIT and how it¨s beneficial in managing our project. GIT originally developed in 2005 by Linus Torvalds, the famous creator of the Linux operating system kernel.
  • 3. What you will learn ?What is Git ? Basic Git Terminology & Common GIT Operations ?Git vs GitHub ?Create Your First Git Local Repository & push it to GitHub
  • 5. What is Git? One of the primary things that Git does and also the primary reason it exists is to keep track of the entire history of things that you are working on. Simply, Git is like a person? who observes your code & remember what you & your teammate changed, when you changed it & why you changed it. He (Git) simply keep track of changes!
  • 6. Basic Git Terminology - 1 ?Repository Now imagine this person keep these changes for each project in different folders?. This Folder is called a repository ?Commit, Every Time you change something in your project you can tell (commit) that person (Git) to remember it with unique ID, so he can tell you about that change in the future if you need.
  • 7. Basic Git Terminology - 2 ?Branch For convenience, he keeps these records in a different cabinet, called branch. In the beginning, there is only one slot called master branch you can tell him to add more!
  • 8. Git Operations ?Init-> To initialize a local directory as Git repository ?Push -> To upload changes to your repository ?Pull -> To download any version of a file from a repository ?Clone -> To clone a remote Git repository (GitHub) to a local machine
  • 10. What is GitHub GitHub is a platform (an online service) that provides hosting for your projects, it is called a remote repository because it's on a remote server. GitHub is also called a remote repository Git is local (tool) but GitHub is online service
  • 12. GitHub Ranking As of January 2020, GitHub reports having over 40 million users and more than 100 million repositories (including at least 28 million public repositories), making it the largest host of source code in the world. GitHub is not the only option! other choices include Git Lab and Bitbucket.
  • 13. Create your First Git local repository - 1 ?Create a sample folder ?named `Demo¨ and place some sample code files in it. ?Create a GitHub Account If you don't have one you can open an account it is available freely over the internet ? https://github.com/
  • 14. Create your First Git local repository - 2 ?Make sure you have Git installed on your machine You can install Git for Windows which provides a BASH emulation used to run Git from the command line. Personally, I like running Git from the command line, but it also provides the Git GUI, a powerful alternative to Git BASH. https://gitforwindows.org/
  • 15. Create your First Git local repository - 3 ?Tell Git who you are $ git config --global user.name "YOUR_USERNAME" $ git config --global user.email "YOUREMAIL@domain.com" $ git config --global --list # To check the info you just provided
  • 16. Create your First Git local repository - 4 ?Let¨s Git Create a new repository on GitHub. Follow the below link: https://github.com/new. Now, locate to the folder you want to place under git in your PC. $ cd Desktop/Demo
  • 17. Create your First Git local repository - 5 ?Initialize Git: $ touch README.md # To create a README file $ git init # Initiates an empty git repository now you have successfully created a Git local repository
  • 18. Add files for commit ?Add the files to the Git repository for commit: $ git add . # Adds all the files in the local repository and stages them for commit ?Commit files you added to your Git repo: $ git commit -m "First commit"# The message in the " " is given so that the other users can read the message and see what changes you made
  • 19. Add a remote origin and Push - 1 Now each time you make changes in your files and save it, it won¨t be automatically updated on GitHub. All the changes we made in the file are updated in the local repository. Now to update the changes to the master: $ git remote add origin remote_repository_URL# sets the new remote The git remote command lets you create, view, and delete connections to other repositories.
  • 20. Add a remote origin and Push - 2 $ git push -u origin master # pushes changes to origin Now the git push command pushes the changes in your local repository up to the remote repository you specified as the origin. And that¨s it. You¨ve just added the files to the repository you just created on GitHub.
  • 21. Q&A For Any inquires feel free to send me an email at ghadialghosh[@]outlook.com Thank You ?