SlideShare a Scribd company logo
Git Learn
From the scratch
Prepared By:
Mir Arif Hasan
B. Sc in CSE at AUST, BD
Email: arif.ishan05@gmail.com
1
Topics 1. Introduction of Git & GitHub
2. Why Git?
3. Git configuration
4. Creating repository, Init, Remote add, Clone
5. Git file status
6. Git Add, Commit, Ammand, Log, Push, Pull
7. Branching, Checkout
8. Merge, Conflicts
9. Collaboration
10. Pull request
2
Introduction of Git & GitHub
Git:
Git is a version control system
You can manage your files version through Git
Gives the scope for open source development
Anyone can update your public repo and request you to
add them
GitHub:
GitHub is a server where the files are stored
3
Why Git?
4
Git is a distributed
version control system
Git Configuration
5
Download & install Git software
Open git bash command to configure
Write below commands:
1. git config --global user.name “<your username>”
2. git config --global user.email <your email>
You can see/test by
1. git config user.name
2. git config user.email
Or, git config --list
*See next page example
Git Configuration
6
Create Repository
7
Create Repository
8
If select public, anybody
can see your repository
Create Repository
9
Copy the HTTP link
Link your repository with local
10
Two way to link up
Clone
[If you have not create any project on your
local server]
Remote add
[If you already started with your project
locally, but you have a new repository]
NB: If you both work on your local and have a old repository, then you should go “Remote add” then
“git pull origin <branch>” and resolve conflicts(if need).
Git Clone
11
Use any command:
1. git clone <HTTP link>
2. git clone <HTTP link> <directory>
You can think ‘clone’ like ‘download’.
Where you open git bash and apply 1st
cmd, there the repo will be download.
Otherwise, there create a directory
then, it will download in the directory.
Remote Add
12
Step 1:
Go to your project folder.
Step 2:
Use command: “git init”
Explanation: For initialize git on that folder
Step 3:
Use command: “git remote add origin <repo url>”
Explanation: For link with remote repository
Step 4: (Optional)
Use command: “git pull origin <branch_name>”
Explanation: If your remote repo is not blank repo.
Git Commands
Local Server - Your PC
Remote Server - GitHub / Cloud
When we init/clone, a ‘.git’ hidden file
generates to track our files and other
data.
git status - Gives the overview of files
git add - Adding file for commit
git commit - Saving for upload/push
git push - Uploading to remote server
git pull - Bringing the change from
remote to local
git branch - See a list of branch
git checkout - Changing branch
13
Git Commands
14
Command 1: “git status”
Explanation: Gives a list of files which are modified, untract etc. You can use this cmd in any
stage.
Command 2: “git add <file name>” or “git add . ”
Explanation: Now you have to select files for the next commit.
Command 3: “git commit -m ‘<comment>’”
Explanation: You are saving your changes by committing. You should pass a comment about what
features add or bug fixed.
Command 5: “git push -u origin master” or “git push -u origin <branch_name>”
Explanation: To upload your project in remote. You have to mention branch name in
command.
Command 6: “git pull origin master” or “git pull origin <branch_name>”
Explanation: This command is for getting all updates from remote to local. Updates will come
Branch
15
Maste
r
Maste
r
Maste
r
pushcheckout pull & pushcheckout
checkout
checkout
pull & push
pull & push
master
signup
login
Branch & Checkout
16
List of branches:
git branch
Create a branch:
git branch <branch_name>
Switching to another branch:
git checkout <destination_branch_name>
Create and switch:
git checkout -b <destination_branch_name>
Some other commands
17
To see all files and folder
ls -la
To visit a directory
cd <directory_name>/
To clear git cmd GUI
clear
For stop current execution
ctrl + c
18
Thank You

More Related Content

What's hot (20)

PDF
Git introduction workshop for scientists
Steven Hamblin
 
PPTX
Git commands
Viyaan Jhiingade
 
PDF
Git for beginners
Arulmurugan Rajaraman
 
PDF
Version Control with Git
Luigi De Russis
 
PPTX
Introduction to Git / Github
Paige Bailey
 
PDF
Git Tutorial I
Jim Yeh
 
PDF
Version Control & Git
Jason Byrne
 
KEY
The everyday developer's guide to version control with Git
E Carter
 
PPTX
Gitting out of trouble
Jon Senchyna
 
PDF
A Practical Introduction to git
Emanuele Olivetti
 
PDF
Version control system
Andrew Liu
 
PPTX
Introduction git
Dian Sigit Prastowo
 
PPTX
From svn to git
Nehal Shah
 
KEY
Introduction To Git
Arnaud Seilles
 
PPTX
Web Programming - Git basics
Ömer Taşkın
 
PPT
Git introduction
satyendrajaladi
 
PPSX
Git the fast version control system
Jeroen Rosenberg
 
PPTX
Grokking opensource with github
GoogleDeveloperStude4
 
PPT
Git basic
Emran Ul Hadi
 
PPSX
Advanced Web Development in PHP - Code Versioning and Branching with Git
Rasan Samarasinghe
 
Git introduction workshop for scientists
Steven Hamblin
 
Git commands
Viyaan Jhiingade
 
Git for beginners
Arulmurugan Rajaraman
 
Version Control with Git
Luigi De Russis
 
Introduction to Git / Github
Paige Bailey
 
Git Tutorial I
Jim Yeh
 
Version Control & Git
Jason Byrne
 
The everyday developer's guide to version control with Git
E Carter
 
Gitting out of trouble
Jon Senchyna
 
A Practical Introduction to git
Emanuele Olivetti
 
Version control system
Andrew Liu
 
Introduction git
Dian Sigit Prastowo
 
From svn to git
Nehal Shah
 
Introduction To Git
Arnaud Seilles
 
Web Programming - Git basics
Ömer Taşkın
 
Git introduction
satyendrajaladi
 
Git the fast version control system
Jeroen Rosenberg
 
Grokking opensource with github
GoogleDeveloperStude4
 
Git basic
Emran Ul Hadi
 
Advanced Web Development in PHP - Code Versioning and Branching with Git
Rasan Samarasinghe
 

Similar to Git learn from scratch (20)

PPTX
git github PPT_GDSCIIITK.pptx
AbelPhilipJoseph
 
PDF
Getting started With GIT
GhadiAlGhosh
 
PPTX
Github Session organized by GDG on campus SCOE.pptx
sanidhyanaik1907
 
PPTX
GitHub Event.pptx
KeerthanaJ32
 
PPTX
Git and GitHub Workshop of GDG on Campus UNSTPB
AmaraCostachiu
 
PDF
git-commands-cheat-sheet-infopediya-com.pdf
murad khan
 
PDF
Formation git
Ghariani Tewfik
 
PDF
introductiontogitandgithub-120702044048-phpapp01.pdf
BruceLee275640
 
PDF
Github and Git What the fuck is this shit .pdf
krishna50blogging
 
PDF
Git Init (Introduction to Git)
GDSC UofT Mississauga
 
PPTX
tech winter break workshop on git &git hub.pptx
ashishraulin
 
PPTX
Git and GitHub workshop of GDG on Campus UNSTPB
AmaraCostachiu
 
PPTX
Git and GitHub Workshop of GDG on Campus UNSTPB
AmaraCostachiu
 
PPTX
Git and GitHub Presentation of GDG on Campus UNSTPB
AmaraCostachiu
 
PDF
GIT_GITHUB_2016_06_17
siva ram
 
PDF
GDSC ZHCET GitHub Session.pdf
gdsczhcet
 
PPTX
git & git hub course in information retrieval .pptx
AmirHosseinGhasemi9
 
PDF
Git basics
GHARSALLAH Mohamed
 
PPTX
Introduction to git hub
Naveen Pandey
 
PPTX
Git and GitHub
Priya Nayak
 
git github PPT_GDSCIIITK.pptx
AbelPhilipJoseph
 
Getting started With GIT
GhadiAlGhosh
 
Github Session organized by GDG on campus SCOE.pptx
sanidhyanaik1907
 
GitHub Event.pptx
KeerthanaJ32
 
Git and GitHub Workshop of GDG on Campus UNSTPB
AmaraCostachiu
 
git-commands-cheat-sheet-infopediya-com.pdf
murad khan
 
Formation git
Ghariani Tewfik
 
introductiontogitandgithub-120702044048-phpapp01.pdf
BruceLee275640
 
Github and Git What the fuck is this shit .pdf
krishna50blogging
 
Git Init (Introduction to Git)
GDSC UofT Mississauga
 
tech winter break workshop on git &git hub.pptx
ashishraulin
 
Git and GitHub workshop of GDG on Campus UNSTPB
AmaraCostachiu
 
Git and GitHub Workshop of GDG on Campus UNSTPB
AmaraCostachiu
 
Git and GitHub Presentation of GDG on Campus UNSTPB
AmaraCostachiu
 
GIT_GITHUB_2016_06_17
siva ram
 
GDSC ZHCET GitHub Session.pdf
gdsczhcet
 
git & git hub course in information retrieval .pptx
AmirHosseinGhasemi9
 
Git basics
GHARSALLAH Mohamed
 
Introduction to git hub
Naveen Pandey
 
Git and GitHub
Priya Nayak
 
Ad

Recently uploaded (20)

PDF
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
 
PDF
DoS Attack vs DDoS Attack_ The Silent Wars of the Internet.pdf
CyberPro Magazine
 
PPTX
Practical Applications of AI in Local Government
OnBoard
 
PDF
''Taming Explosive Growth: Building Resilience in a Hyper-Scaled Financial Pl...
Fwdays
 
PDF
Redefining Work in the Age of AI - What to expect? How to prepare? Why it mat...
Malinda Kapuruge
 
PDF
Quantum AI Discoveries: Fractal Patterns Consciousness and Cyclical Universes
Saikat Basu
 
PPTX
Smarter Governance with AI: What Every Board Needs to Know
OnBoard
 
PDF
Bridging CAD, IBM TRIRIGA & GIS with FME: The Portland Public Schools Case
Safe Software
 
PDF
Simplify Your FME Flow Setup: Fault-Tolerant Deployment Made Easy with Packer...
Safe Software
 
PPTX
2025 HackRedCon Cyber Career Paths.pptx Scott Stanton
Scott Stanton
 
PDF
Proactive Server and System Monitoring with FME: Using HTTP and System Caller...
Safe Software
 
PDF
How to Visualize the ​Spatio-Temporal Data Using CesiumJS​
SANGHEE SHIN
 
PDF
Understanding The True Cost of DynamoDB Webinar
ScyllaDB
 
PDF
Kubernetes - Architecture & Components.pdf
geethak285
 
PDF
Dev Dives: Accelerating agentic automation with Autopilot for Everyone
UiPathCommunity
 
PDF
Enhancing Environmental Monitoring with Real-Time Data Integration: Leveragin...
Safe Software
 
PDF
Automating the Geo-Referencing of Historic Aerial Photography in Flanders
Safe Software
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PPTX
Enabling the Digital Artisan – keynote at ICOCI 2025
Alan Dix
 
PDF
ArcGIS Utility Network Migration - The Hunter Water Story
Safe Software
 
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
 
DoS Attack vs DDoS Attack_ The Silent Wars of the Internet.pdf
CyberPro Magazine
 
Practical Applications of AI in Local Government
OnBoard
 
''Taming Explosive Growth: Building Resilience in a Hyper-Scaled Financial Pl...
Fwdays
 
Redefining Work in the Age of AI - What to expect? How to prepare? Why it mat...
Malinda Kapuruge
 
Quantum AI Discoveries: Fractal Patterns Consciousness and Cyclical Universes
Saikat Basu
 
Smarter Governance with AI: What Every Board Needs to Know
OnBoard
 
Bridging CAD, IBM TRIRIGA & GIS with FME: The Portland Public Schools Case
Safe Software
 
Simplify Your FME Flow Setup: Fault-Tolerant Deployment Made Easy with Packer...
Safe Software
 
2025 HackRedCon Cyber Career Paths.pptx Scott Stanton
Scott Stanton
 
Proactive Server and System Monitoring with FME: Using HTTP and System Caller...
Safe Software
 
How to Visualize the ​Spatio-Temporal Data Using CesiumJS​
SANGHEE SHIN
 
Understanding The True Cost of DynamoDB Webinar
ScyllaDB
 
Kubernetes - Architecture & Components.pdf
geethak285
 
Dev Dives: Accelerating agentic automation with Autopilot for Everyone
UiPathCommunity
 
Enhancing Environmental Monitoring with Real-Time Data Integration: Leveragin...
Safe Software
 
Automating the Geo-Referencing of Historic Aerial Photography in Flanders
Safe Software
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Enabling the Digital Artisan – keynote at ICOCI 2025
Alan Dix
 
ArcGIS Utility Network Migration - The Hunter Water Story
Safe Software
 
Ad

Git learn from scratch

  • 1. Git Learn From the scratch Prepared By: Mir Arif Hasan B. Sc in CSE at AUST, BD Email: [email protected] 1
  • 2. Topics 1. Introduction of Git & GitHub 2. Why Git? 3. Git configuration 4. Creating repository, Init, Remote add, Clone 5. Git file status 6. Git Add, Commit, Ammand, Log, Push, Pull 7. Branching, Checkout 8. Merge, Conflicts 9. Collaboration 10. Pull request 2
  • 3. Introduction of Git & GitHub Git: Git is a version control system You can manage your files version through Git Gives the scope for open source development Anyone can update your public repo and request you to add them GitHub: GitHub is a server where the files are stored 3
  • 4. Why Git? 4 Git is a distributed version control system
  • 5. Git Configuration 5 Download & install Git software Open git bash command to configure Write below commands: 1. git config --global user.name “<your username>” 2. git config --global user.email <your email> You can see/test by 1. git config user.name 2. git config user.email Or, git config --list *See next page example
  • 8. Create Repository 8 If select public, anybody can see your repository
  • 10. Link your repository with local 10 Two way to link up Clone [If you have not create any project on your local server] Remote add [If you already started with your project locally, but you have a new repository] NB: If you both work on your local and have a old repository, then you should go “Remote add” then “git pull origin <branch>” and resolve conflicts(if need).
  • 11. Git Clone 11 Use any command: 1. git clone <HTTP link> 2. git clone <HTTP link> <directory> You can think ‘clone’ like ‘download’. Where you open git bash and apply 1st cmd, there the repo will be download. Otherwise, there create a directory then, it will download in the directory.
  • 12. Remote Add 12 Step 1: Go to your project folder. Step 2: Use command: “git init” Explanation: For initialize git on that folder Step 3: Use command: “git remote add origin <repo url>” Explanation: For link with remote repository Step 4: (Optional) Use command: “git pull origin <branch_name>” Explanation: If your remote repo is not blank repo.
  • 13. Git Commands Local Server - Your PC Remote Server - GitHub / Cloud When we init/clone, a ‘.git’ hidden file generates to track our files and other data. git status - Gives the overview of files git add - Adding file for commit git commit - Saving for upload/push git push - Uploading to remote server git pull - Bringing the change from remote to local git branch - See a list of branch git checkout - Changing branch 13
  • 14. Git Commands 14 Command 1: “git status” Explanation: Gives a list of files which are modified, untract etc. You can use this cmd in any stage. Command 2: “git add <file name>” or “git add . ” Explanation: Now you have to select files for the next commit. Command 3: “git commit -m ‘<comment>’” Explanation: You are saving your changes by committing. You should pass a comment about what features add or bug fixed. Command 5: “git push -u origin master” or “git push -u origin <branch_name>” Explanation: To upload your project in remote. You have to mention branch name in command. Command 6: “git pull origin master” or “git pull origin <branch_name>” Explanation: This command is for getting all updates from remote to local. Updates will come
  • 15. Branch 15 Maste r Maste r Maste r pushcheckout pull & pushcheckout checkout checkout pull & push pull & push master signup login
  • 16. Branch & Checkout 16 List of branches: git branch Create a branch: git branch <branch_name> Switching to another branch: git checkout <destination_branch_name> Create and switch: git checkout -b <destination_branch_name>
  • 17. Some other commands 17 To see all files and folder ls -la To visit a directory cd <directory_name>/ To clear git cmd GUI clear For stop current execution ctrl + c