SlideShare a Scribd company logo
Common Git Commands Deployment
Benefits and Best Practices
Table of Contents
2
 Git
 Git Uses
 Git’s Functionality
 git clone
 git add
 git commit
 git checkout
 git rm
 git fetch
 git pull
 git merge
 git push
 Git refers to a system, which is meant for tracking changes to files as well as directories (a version
control system). Git records all the changes in content, and stores the history related to every change.
Repositories, which are a type of data structure, are used by Git for managing files. Repositories are
present within a specific directory. These contain the files as well as a record with regard to changes.
The multiple sets of changes that exist within a repository are separated by branches.
3
Git
 Git is usually used by software developers for managing codes. Git can be used by anyone for managing
any type of file. The flexibility of Git enables the use of Git for both, simple as well as complex projects.
Git-managed content can be configured as per one’s needs. This is made possible through multiple
branches and repositories. There are certain features in Git, which enable the viewing of information
with regard to revisions, as well as aid in finding the cause of an issue, and manipulate changes.
4
Git Uses
 The command line is used to access all of Git’s functionality. Some of its most common commands and
options are listed in the following slides.
 The information contained here isn’t comprehensive, and information about intermediate as well as
advanced Git functionality have been omitted.
5
Git’s Functionality
6
1-800-123 -8156
Whoa!That’s a big number, aren’t
you proud?
It is a command that is meant for cloning a repository into a new directory. It also creates remote-tracking
branches, as well as forks a new working branch from the active branch of the cloned repository.
 The git fetch command should be used to update the remote-tracking branches of the new repository.
 The git pull command should be used for merging the remote master branch into the current master
branch.
 The Git Version Control interface in cPanel provides the URL, which is used for cloning the
repositories of each account.
cPanel >> Home >> Files >> GitVersion Control
7
Git Clone
 This command is used for adding a file’s current version to the index of staged content for the next
commit.
 Only the current changes for the current commit are staged by this command.When a commit is
created again, the command for the file needs to be run again.This is needed to stage any new changes.
8
Git Add
 This command is meant for creating a new commit for the currently-staged changes.
 Use the git add or the git rm commands for staging changes for inclusion in a commit, or individual
filepaths can be provided as arguments to this command.
9
Git Commit
 Through this command a specified branch can be set as the current working branch.
 This command needs to be run with a file path, rather than a branch name, for the purpose of checking
out only a specified file.
 If the branch name is omitted, Git will check out that file from the current branch’s HEAD.
10
Git Checkout
 This command serves the function of removing directories or files from Git’s index, and working tree.
 The specified file should not contain uncommitted changes, if this command needs to be run.
 This command isn’t capable of retaining the file in the index, and removing it from the working tree.To
get that done, you have to use BASH’s rm command.
11
Git RM
 Branches, tags, as well as their histories are downloaded by this command from one or more
repositories.
12
Git Fetch
 This command is used for fetching and merging changes from a local branch or from a remote or local
repository. Usually, this command combines the git fetch and the git merge commands.
13
Git Pull
 This command is meant for combining the history of one or multiple commits into the current
branch’s history.
14
Git Merge
 This command is used to add the committed changes to that repository and branch, which have been
specified. A repository needs to be explicitly specified, in order to specify a branch. If a branch isn’t
specified, the command adds the changes to the current branch of the remote repository.
 The Git Version Control feature in cPanel automatically adds a post-receive hook. This is triggered by
each push to cPanel-manged repositories.
 To digress, cPanel is a web hosting control panel. Web hosting is a service provided by web hosting
companies for making websites accessible. Web hosting can be of many types. For example, terms such
as “Linux Shared Hosting”, and “Windows Shared Hosting”, refer to a type of web hosting that is
shared and Linux-based.
15
Git Push
16
Thanks!
ANY QUESTIONS?
www.htshosting.org
www.htshosting.org/best-web-hosting-company-India
www.htshosting.org/best-windows-hosting
www.htshosting.org/best-cloud-hosting-company

More Related Content

PPTX
Git undo
PPSX
Advanced Web Development in PHP - Code Versioning and Branching with Git
PPTX
Git presentation
PDF
Version Control & Git
PDF
Git Tricks
PDF
Version Control System - Git
PPT
GIT By Sivakrishna
PPTX
Git hub abduallah abu nada
Git undo
Advanced Web Development in PHP - Code Versioning and Branching with Git
Git presentation
Version Control & Git
Git Tricks
Version Control System - Git
GIT By Sivakrishna
Git hub abduallah abu nada

What's hot (20)

PDF
Version Control with Git
PDF
Git Workflow
PDF
Git for developers
PDF
Gn unify git
PDF
Git Series. Episode 2. Merge, Upstream Commands and Tags
PPTX
Git commands
PPSX
Git the fast version control system
PDF
Version control system
PPTX
Extra bit with git
PPTX
Extra bit with git
PPTX
GDSC - Introduction to GIT
PDF
Advance workshop on git
PPTX
Git overview
PDF
git Versioning
PPTX
Version control system and Git
PDF
18 Git #burningkeyboards
PPTX
Git Gyan
PDF
Git basics for beginners
PDF
Git Version Control System
PPTX
Git_and_GitHub Integration_with_Guidewire
Version Control with Git
Git Workflow
Git for developers
Gn unify git
Git Series. Episode 2. Merge, Upstream Commands and Tags
Git commands
Git the fast version control system
Version control system
Extra bit with git
Extra bit with git
GDSC - Introduction to GIT
Advance workshop on git
Git overview
git Versioning
Version control system and Git
18 Git #burningkeyboards
Git Gyan
Git basics for beginners
Git Version Control System
Git_and_GitHub Integration_with_Guidewire
Ad

Similar to Common Git Commands (20)

PPTX
Bitbucket as a code server and pmt
PDF
Git in a nutshell
PPTX
Git workshop - University of Moratuwa, Department of Computer Science and Eng...
PPTX
Getting Git...before it gets you
PDF
Formation git
PPTX
git github PPT_GDSCIIITK.pptx
PPTX
Using Git and BitBucket
PDF
Collaborative development with Git | Workshop
PDF
Git Tutorial A Comprehensive Guide for Beginners.pdf
PPTX
Introduction to git hub
PPT
Introduction to Git
PPT
Git presentation
PDF
Git basics
PPTX
Version Control System-git status,git add,git commit,git log.pptx
PPTX
An introduction to Git
PPTX
Understanding about git
PPTX
sample.pptx
PDF
Starting with Git & GitHub
PPTX
Brown bag sessions git workshop
Bitbucket as a code server and pmt
Git in a nutshell
Git workshop - University of Moratuwa, Department of Computer Science and Eng...
Getting Git...before it gets you
Formation git
git github PPT_GDSCIIITK.pptx
Using Git and BitBucket
Collaborative development with Git | Workshop
Git Tutorial A Comprehensive Guide for Beginners.pdf
Introduction to git hub
Introduction to Git
Git presentation
Git basics
Version Control System-git status,git add,git commit,git log.pptx
An introduction to Git
Understanding about git
sample.pptx
Starting with Git & GitHub
Brown bag sessions git workshop
Ad

More from HTS Hosting (20)

PPTX
Web Hosting and WordPress Hosting
PPTX
Availing Windows Dedicated Servers of HTS Hosting
PPTX
HTS Dedicated Servers
PPTX
Linux Dedicated Server Plans
PPTX
HTS Dedicated Servers
PPTX
Common Web Hosting Solutions
PPTX
Basic Web Host Manager Setup
PPTX
Essential Features in Web Hosting Plans
PPTX
VPS Hosting
PPTX
Difference Between Managed VPS Hosting Self-Managed VPS Hosting
PPTX
Web Hosting, Web Servers, Web Hosts and More
PPTX
Know about Hosting a Business Website
PPTX
Web Hosting Terms
PPTX
Reseller Hosting and Dedicated Web Servers
PPTX
Reseller Hosting and Managed VPS Hosting
PPTX
Backup Tarball Contents
PPTX
VPS and Dedicated Servers
PPTX
Best WordPress Hosting Plans
PPTX
Best Linux Dedicated Hosting Plans
PPTX
Different Types of Web Hosting Services
Web Hosting and WordPress Hosting
Availing Windows Dedicated Servers of HTS Hosting
HTS Dedicated Servers
Linux Dedicated Server Plans
HTS Dedicated Servers
Common Web Hosting Solutions
Basic Web Host Manager Setup
Essential Features in Web Hosting Plans
VPS Hosting
Difference Between Managed VPS Hosting Self-Managed VPS Hosting
Web Hosting, Web Servers, Web Hosts and More
Know about Hosting a Business Website
Web Hosting Terms
Reseller Hosting and Dedicated Web Servers
Reseller Hosting and Managed VPS Hosting
Backup Tarball Contents
VPS and Dedicated Servers
Best WordPress Hosting Plans
Best Linux Dedicated Hosting Plans
Different Types of Web Hosting Services

Recently uploaded (20)

PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Encapsulation theory and applications.pdf
PDF
Approach and Philosophy of On baking technology
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPT
Teaching material agriculture food technology
PDF
Empathic Computing: Creating Shared Understanding
PDF
KodekX | Application Modernization Development
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Electronic commerce courselecture one. Pdf
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Cloud computing and distributed systems.
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Spectroscopy.pptx food analysis technology
Encapsulation_ Review paper, used for researhc scholars
Per capita expenditure prediction using model stacking based on satellite ima...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Encapsulation theory and applications.pdf
Approach and Philosophy of On baking technology
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Teaching material agriculture food technology
Empathic Computing: Creating Shared Understanding
KodekX | Application Modernization Development
NewMind AI Weekly Chronicles - August'25 Week I
Reach Out and Touch Someone: Haptics and Empathic Computing
Electronic commerce courselecture one. Pdf
Machine learning based COVID-19 study performance prediction
Cloud computing and distributed systems.
20250228 LYD VKU AI Blended-Learning.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Spectral efficient network and resource selection model in 5G networks
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Spectroscopy.pptx food analysis technology

Common Git Commands

  • 1. Common Git Commands Deployment Benefits and Best Practices
  • 2. Table of Contents 2  Git  Git Uses  Git’s Functionality  git clone  git add  git commit  git checkout  git rm  git fetch  git pull  git merge  git push
  • 3.  Git refers to a system, which is meant for tracking changes to files as well as directories (a version control system). Git records all the changes in content, and stores the history related to every change. Repositories, which are a type of data structure, are used by Git for managing files. Repositories are present within a specific directory. These contain the files as well as a record with regard to changes. The multiple sets of changes that exist within a repository are separated by branches. 3 Git
  • 4.  Git is usually used by software developers for managing codes. Git can be used by anyone for managing any type of file. The flexibility of Git enables the use of Git for both, simple as well as complex projects. Git-managed content can be configured as per one’s needs. This is made possible through multiple branches and repositories. There are certain features in Git, which enable the viewing of information with regard to revisions, as well as aid in finding the cause of an issue, and manipulate changes. 4 Git Uses
  • 5.  The command line is used to access all of Git’s functionality. Some of its most common commands and options are listed in the following slides.  The information contained here isn’t comprehensive, and information about intermediate as well as advanced Git functionality have been omitted. 5 Git’s Functionality
  • 6. 6 1-800-123 -8156 Whoa!That’s a big number, aren’t you proud?
  • 7. It is a command that is meant for cloning a repository into a new directory. It also creates remote-tracking branches, as well as forks a new working branch from the active branch of the cloned repository.  The git fetch command should be used to update the remote-tracking branches of the new repository.  The git pull command should be used for merging the remote master branch into the current master branch.  The Git Version Control interface in cPanel provides the URL, which is used for cloning the repositories of each account. cPanel >> Home >> Files >> GitVersion Control 7 Git Clone
  • 8.  This command is used for adding a file’s current version to the index of staged content for the next commit.  Only the current changes for the current commit are staged by this command.When a commit is created again, the command for the file needs to be run again.This is needed to stage any new changes. 8 Git Add
  • 9.  This command is meant for creating a new commit for the currently-staged changes.  Use the git add or the git rm commands for staging changes for inclusion in a commit, or individual filepaths can be provided as arguments to this command. 9 Git Commit
  • 10.  Through this command a specified branch can be set as the current working branch.  This command needs to be run with a file path, rather than a branch name, for the purpose of checking out only a specified file.  If the branch name is omitted, Git will check out that file from the current branch’s HEAD. 10 Git Checkout
  • 11.  This command serves the function of removing directories or files from Git’s index, and working tree.  The specified file should not contain uncommitted changes, if this command needs to be run.  This command isn’t capable of retaining the file in the index, and removing it from the working tree.To get that done, you have to use BASH’s rm command. 11 Git RM
  • 12.  Branches, tags, as well as their histories are downloaded by this command from one or more repositories. 12 Git Fetch
  • 13.  This command is used for fetching and merging changes from a local branch or from a remote or local repository. Usually, this command combines the git fetch and the git merge commands. 13 Git Pull
  • 14.  This command is meant for combining the history of one or multiple commits into the current branch’s history. 14 Git Merge
  • 15.  This command is used to add the committed changes to that repository and branch, which have been specified. A repository needs to be explicitly specified, in order to specify a branch. If a branch isn’t specified, the command adds the changes to the current branch of the remote repository.  The Git Version Control feature in cPanel automatically adds a post-receive hook. This is triggered by each push to cPanel-manged repositories.  To digress, cPanel is a web hosting control panel. Web hosting is a service provided by web hosting companies for making websites accessible. Web hosting can be of many types. For example, terms such as “Linux Shared Hosting”, and “Windows Shared Hosting”, refer to a type of web hosting that is shared and Linux-based. 15 Git Push