SlideShare a Scribd company logo
Git & GitHub
Reetam Dey
Anshumohan Acharya
By -
git github PPT_GDSCIIITK.pptx
Git - Downloading Package (git-scm.com)
INSTALLATION GUIDE
Windows User ?? Oh ! Or is it MACOS ??
Git - Downloading Package (git-scm.com)
Well , if it’s Linux / Unix --
UBUNTU : sudo apt install git
OR
FEDORA : sudo yum install git
“Let’s Git init”
What is Version Control?
Local Version Control System
A local copy is created in my own computer .
All versions are stored in folder , sub-folders or
A database. That’s the user’s choice.
But what if I want to collaborate with people ??
Or what if my computer stops working ??
Centralised Version Control System (CVCS)
A Centralized Version Control System , Here
we have a server and a client. The server is
the master repository that contains all of the
versions of the code. To work on any
project, firstly user or client needs to get the
code from the master repository or server.
So the client communicates with the server
and pulls all the code or current version of
the code from the server to their local
machine.
Distributed Version Control System (DVCS)
In distributed version control most of
the mechanism or model applies the
same as centralized. The only major
difference you will find here is, instead
of one single repository which is the
server, here every single developer or
client has their own server and they will
have a copy of the entire history or
version of the code and all of its
branches in their local server or
machine.
Git and Github
There are many words to define git, but it is an open-source distributed version control
system in simpler words.
Why is git needed?
When a team works on real-life projects, git helps ensure no code conflicts between the
developers. Furthermore, the project requirements change often. So a git manages all
the versions. If needed, we can also go back to the original code. The concept of
branching allows several projects to run in the same codebase.
GitHub is a Git repository hosting service that provides a web-based graphical interface.
It is the largest community in the world. Whenever a project is open-source, that
particular repository gains exposure to the public and invites several people to
contribute.
git github PPT_GDSCIIITK.pptx
Advantages of Git
•Speed
•Simplicity
•Fully Distributed
•Excellent support for parallel development, support for hundreds of parallel
branches.
•Integrity
Git commands
Here is a list of most essential Git commands that are used daily.
1.Git config commandd
2.Git clone command
3.Git add command
4.Git commit command
5.Git status command
6.Git push Command
7.Git pull command
8.Git Branch Command
9.Git Merge Command
10.Git log command
But there are many more commands..Let’s start…!
For new git users
Git supports a command called git config that lets you get and set configuration
variables that control all facets of how Git looks and operates.
$ git config --global user.name “GDSC IIIT KOTTAYAM“
$ git config --global user.email “gdsc@iiitkottayam.ac.in"
You can check your configuration settings :
$ git config -list
Git init
The git init command is the first command that you will run on Git. The git init command
is used to create a new blank repository. It is used to make an existing project as a Git
project.
$ git init
Example :
Git Status
We can list all the untracked files by git status command.
$ git status
Git add
The git add command is used to add file contents to the index (Staging area) .This
command updates the current content of the working tree to the staging area. It also
prepares the staged content for the next commit. Every time we add or update any file in
our project, it is required to forward updates to the staging area.
$ git add <File name>
git github PPT_GDSCIIITK.pptx
git github PPT_GDSCIIITK.pptx
git github PPT_GDSCIIITK.pptx
git github PPT_GDSCIIITK.pptx
git github PPT_GDSCIIITK.pptx
Git Commit
It is used to record the changes in the repository. It is the next command after the git
add. Every commit contains the index data and the commit message.
Commits are the snapshots of the project. Every commit is recorded in the master
branch of the repository. We can recall the commits or revert it to the older version. Two
different commits will never overwrite because each commit has its own commit-id. This
commit-id is a cryptographic number created by SHA (Secure Hash
Algorithm) algorithm.
$ git commit -m <Commiting Message>
Git clone
In Git, cloning is the act of making a copy of any target repository. The target repository
can be remote or local. You can clone your repository from the remote repository to
create a local copy on your system.
$ git clone <repository URL>
Git ignore
In Git, the term "ignore" is used to specify intentionally untracked files that Git should ignore.
It doesn't affect the Files that already tracked by Git. The file system of Git is classified into
three categories:
Tracked:
Tracked files are such files that are previously staged or committed.
Untracked:
Untracked files are such files that are not previously staged or committed.
Ignored:
Ignored files are such files that are explicitly ignored by git. We have to tell git to ignore such
files.
$ touch .gitignore
Git Fork
A fork is a rough copy of a repository. Forking a repository allows you to freely test and
debug with changes without affecting the original project.
the forked repository looks like pune2016/GitExample2. At the bottom of the repository
name, we can see a description of the repository. At the top right corner, the option fork is
increased by 1 number.
Git Push
The push term refers to upload local repository content to a remote repository. Pushing
is an act of transfer commits from your local repository to a remote repository. Pushing is
capable of overwriting changes; caution should be taken when pushing.
Git pull
The term pull is used to receive data from
GitHub. It fetches and merges changes from
the remote server to your working directory.
The git pull command is used to pull a
repository.
Pull request is a process for a developer to
notify team members that they have
completed a feature. Once their feature
branch is ready, the developer files a pull
request via their remote server account. Pull
request announces all the team members
that they need to review the code and
merge it into the master branch.
$ git pull
Git merge
In Git, the merging is a procedure to connect the forked history. It joins two or more
development history together.
Generally, git merge is used to combine two branches.
$ git merge <branchname>
Merge conflicts
When two branches are trying to merge, and both are edited at the same time and in the
same file, Git won't be able to identify which version is to take for changes. Such a
situation is called merge conflict. If such a situation occurs, it stops just before the merge
commit so that you can resolve the conflicts manually.
Git cheatsheet
Git Cheat Sheet – javatpoint
git-cheat-sheet-education (github.com)
Git resources
Ad

More Related Content

Similar to git github PPT_GDSCIIITK.pptx (20)

Introduction to git and Github
Introduction to git and GithubIntroduction to git and Github
Introduction to git and Github
Wycliff1
 
Github By Nyros Developer
Github By Nyros DeveloperGithub By Nyros Developer
Github By Nyros Developer
Nyros Technologies
 
Git Commands Every Developer Should Know?
Git Commands Every Developer Should Know?Git Commands Every Developer Should Know?
Git Commands Every Developer Should Know?
9 series
 
Git & GitLab
Git & GitLabGit & GitLab
Git & GitLab
Gaurav Wable
 
Introduction to Git and Github - Google Developer Student Clubs CET, Trivandrum
Introduction to Git and Github - Google Developer Student Clubs CET, TrivandrumIntroduction to Git and Github - Google Developer Student Clubs CET, Trivandrum
Introduction to Git and Github - Google Developer Student Clubs CET, Trivandrum
AbhijitNarayan2
 
Git Training
Git TrainingGit Training
Git Training
Prabal Tyagi
 
Version Control System-git status,git add,git commit,git log.pptx
Version Control System-git status,git add,git commit,git log.pptxVersion Control System-git status,git add,git commit,git log.pptx
Version Control System-git status,git add,git commit,git log.pptx
ChayapathiAR
 
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
 
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
 
Day 2_ Get Git with It! A Developer's Workshop.pptx
Day 2_ Get Git with It! A Developer's Workshop.pptxDay 2_ Get Git with It! A Developer's Workshop.pptx
Day 2_ Get Git with It! A Developer's Workshop.pptx
Google Developer Students Clubs - CTU
 
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 github
Git githubGit github
Git github
Anurag Deb
 
Git_tutorial.pdf
Git_tutorial.pdfGit_tutorial.pdf
Git_tutorial.pdf
AliaaTarek5
 
GDSC ZHCET GitHub Session.pdf
GDSC ZHCET GitHub Session.pdfGDSC ZHCET GitHub Session.pdf
GDSC ZHCET GitHub Session.pdf
gdsczhcet
 
Git
GitGit
Git
Majid Hajiloo
 
git KT .pptx
git KT .pptxgit KT .pptx
git KT .pptx
sumit583388
 
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Simplilearn
 
Git Basics
Git BasicsGit Basics
Git Basics
Ryan Condron
 
Git Session 2K23.pptx
Git Session 2K23.pptxGit Session 2K23.pptx
Git Session 2K23.pptx
Eshaan35
 
Git and Github
Git and GithubGit and Github
Git and Github
Teodora Ahkozidou
 
Introduction to git and Github
Introduction to git and GithubIntroduction to git and Github
Introduction to git and Github
Wycliff1
 
Git Commands Every Developer Should Know?
Git Commands Every Developer Should Know?Git Commands Every Developer Should Know?
Git Commands Every Developer Should Know?
9 series
 
Introduction to Git and Github - Google Developer Student Clubs CET, Trivandrum
Introduction to Git and Github - Google Developer Student Clubs CET, TrivandrumIntroduction to Git and Github - Google Developer Student Clubs CET, Trivandrum
Introduction to Git and Github - Google Developer Student Clubs CET, Trivandrum
AbhijitNarayan2
 
Version Control System-git status,git add,git commit,git log.pptx
Version Control System-git status,git add,git commit,git log.pptxVersion Control System-git status,git add,git commit,git log.pptx
Version Control System-git status,git add,git commit,git log.pptx
ChayapathiAR
 
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
 
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_tutorial.pdf
Git_tutorial.pdfGit_tutorial.pdf
Git_tutorial.pdf
AliaaTarek5
 
GDSC ZHCET GitHub Session.pdf
GDSC ZHCET GitHub Session.pdfGDSC ZHCET GitHub Session.pdf
GDSC ZHCET GitHub Session.pdf
gdsczhcet
 
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Simplilearn
 
Git Session 2K23.pptx
Git Session 2K23.pptxGit Session 2K23.pptx
Git Session 2K23.pptx
Eshaan35
 

Recently uploaded (20)

Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
steaveroggers
 
Download YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full ActivatedDownload YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full Activated
saniamalik72555
 
Download Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With LatestDownload Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With Latest
tahirabibi60507
 
How to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud PerformanceHow to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud Performance
ThousandEyes
 
FL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full VersionFL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full Version
tahirabibi60507
 
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Eric D. Schabell
 
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
ssuserb14185
 
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Orangescrum
 
Douwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License codeDouwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License code
aneelaramzan63
 
Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]
saniaaftab72555
 
Expand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchangeExpand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchange
Fexle Services Pvt. Ltd.
 
WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)
sh607827
 
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Lionel Briand
 
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AIScaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
danshalev
 
Societal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainabilitySocietal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainability
Jordi Cabot
 
The Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdfThe Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdf
drewplanas10
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
steaveroggers
 
Download YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full ActivatedDownload YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full Activated
saniamalik72555
 
Download Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With LatestDownload Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With Latest
tahirabibi60507
 
How to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud PerformanceHow to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud Performance
ThousandEyes
 
FL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full VersionFL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full Version
tahirabibi60507
 
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Eric D. Schabell
 
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
ssuserb14185
 
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Orangescrum
 
Douwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License codeDouwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License code
aneelaramzan63
 
Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]
saniaaftab72555
 
Expand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchangeExpand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchange
Fexle Services Pvt. Ltd.
 
WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)
sh607827
 
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Lionel Briand
 
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AIScaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
danshalev
 
Societal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainabilitySocietal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainability
Jordi Cabot
 
The Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdfThe Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdf
drewplanas10
 
Ad

git github PPT_GDSCIIITK.pptx

  • 1. Git & GitHub Reetam Dey Anshumohan Acharya By -
  • 3. Git - Downloading Package (git-scm.com) INSTALLATION GUIDE Windows User ?? Oh ! Or is it MACOS ?? Git - Downloading Package (git-scm.com) Well , if it’s Linux / Unix -- UBUNTU : sudo apt install git OR FEDORA : sudo yum install git
  • 5. What is Version Control?
  • 6. Local Version Control System A local copy is created in my own computer . All versions are stored in folder , sub-folders or A database. That’s the user’s choice. But what if I want to collaborate with people ?? Or what if my computer stops working ??
  • 7. Centralised Version Control System (CVCS) A Centralized Version Control System , Here we have a server and a client. The server is the master repository that contains all of the versions of the code. To work on any project, firstly user or client needs to get the code from the master repository or server. So the client communicates with the server and pulls all the code or current version of the code from the server to their local machine.
  • 8. Distributed Version Control System (DVCS) In distributed version control most of the mechanism or model applies the same as centralized. The only major difference you will find here is, instead of one single repository which is the server, here every single developer or client has their own server and they will have a copy of the entire history or version of the code and all of its branches in their local server or machine.
  • 9. Git and Github There are many words to define git, but it is an open-source distributed version control system in simpler words. Why is git needed? When a team works on real-life projects, git helps ensure no code conflicts between the developers. Furthermore, the project requirements change often. So a git manages all the versions. If needed, we can also go back to the original code. The concept of branching allows several projects to run in the same codebase. GitHub is a Git repository hosting service that provides a web-based graphical interface. It is the largest community in the world. Whenever a project is open-source, that particular repository gains exposure to the public and invites several people to contribute.
  • 11. Advantages of Git •Speed •Simplicity •Fully Distributed •Excellent support for parallel development, support for hundreds of parallel branches. •Integrity
  • 12. Git commands Here is a list of most essential Git commands that are used daily. 1.Git config commandd 2.Git clone command 3.Git add command 4.Git commit command 5.Git status command 6.Git push Command 7.Git pull command 8.Git Branch Command 9.Git Merge Command 10.Git log command But there are many more commands..Let’s start…!
  • 13. For new git users Git supports a command called git config that lets you get and set configuration variables that control all facets of how Git looks and operates. $ git config --global user.name “GDSC IIIT KOTTAYAM“ $ git config --global user.email “[email protected]" You can check your configuration settings : $ git config -list
  • 14. Git init The git init command is the first command that you will run on Git. The git init command is used to create a new blank repository. It is used to make an existing project as a Git project. $ git init Example :
  • 15. Git Status We can list all the untracked files by git status command. $ git status
  • 16. Git add The git add command is used to add file contents to the index (Staging area) .This command updates the current content of the working tree to the staging area. It also prepares the staged content for the next commit. Every time we add or update any file in our project, it is required to forward updates to the staging area. $ git add <File name>
  • 22. Git Commit It is used to record the changes in the repository. It is the next command after the git add. Every commit contains the index data and the commit message. Commits are the snapshots of the project. Every commit is recorded in the master branch of the repository. We can recall the commits or revert it to the older version. Two different commits will never overwrite because each commit has its own commit-id. This commit-id is a cryptographic number created by SHA (Secure Hash Algorithm) algorithm. $ git commit -m <Commiting Message>
  • 23. Git clone In Git, cloning is the act of making a copy of any target repository. The target repository can be remote or local. You can clone your repository from the remote repository to create a local copy on your system. $ git clone <repository URL>
  • 24. Git ignore In Git, the term "ignore" is used to specify intentionally untracked files that Git should ignore. It doesn't affect the Files that already tracked by Git. The file system of Git is classified into three categories: Tracked: Tracked files are such files that are previously staged or committed. Untracked: Untracked files are such files that are not previously staged or committed. Ignored: Ignored files are such files that are explicitly ignored by git. We have to tell git to ignore such files. $ touch .gitignore
  • 25. Git Fork A fork is a rough copy of a repository. Forking a repository allows you to freely test and debug with changes without affecting the original project. the forked repository looks like pune2016/GitExample2. At the bottom of the repository name, we can see a description of the repository. At the top right corner, the option fork is increased by 1 number.
  • 26. Git Push The push term refers to upload local repository content to a remote repository. Pushing is an act of transfer commits from your local repository to a remote repository. Pushing is capable of overwriting changes; caution should be taken when pushing.
  • 27. Git pull The term pull is used to receive data from GitHub. It fetches and merges changes from the remote server to your working directory. The git pull command is used to pull a repository. Pull request is a process for a developer to notify team members that they have completed a feature. Once their feature branch is ready, the developer files a pull request via their remote server account. Pull request announces all the team members that they need to review the code and merge it into the master branch. $ git pull
  • 28. Git merge In Git, the merging is a procedure to connect the forked history. It joins two or more development history together. Generally, git merge is used to combine two branches. $ git merge <branchname>
  • 29. Merge conflicts When two branches are trying to merge, and both are edited at the same time and in the same file, Git won't be able to identify which version is to take for changes. Such a situation is called merge conflict. If such a situation occurs, it stops just before the merge commit so that you can resolve the conflicts manually.
  • 30. Git cheatsheet Git Cheat Sheet – javatpoint git-cheat-sheet-education (github.com)