Git Command
Git Command
Git Command
www.srvx.co.in
Saurav Singh
@srvx_code
1. git init
This command let us create a new reposiitory.
A hidden .git directory is added to the folder.
www.srvx.co.in
Saurav Singh
@srvx_code
2. git clone
This command creates a local copy of a
remote repository .
www.srvx.co.in
Saurav Singh
@srvx_code
3. git add
This command add your changes to staging
area where you can compare you local version
with remote repo code.
www.srvx.co.in
Saurav Singh
@srvx_code
4. git commit
This command saves your changes to your
local repository.
www.srvx.co.in
Saurav Singh
@srvx_code
5. git push
This command push your changes from local
repository to your remote repository. One can
only push the committed changes.
www.srvx.co.in
Saurav Singh
@srvx_code
6. git pull
This command fetches latest changes from
remote repository to your local. This is helpful
when multiple people are working on same
repository. It will help to keep your local repo
updated with latest code.
www.srvx.co.in
Saurav Singh
@srvx_code
7. git checkout
This command helps to switch to an existing
branch or create a new branch.
www.srvx.co.in
Saurav Singh
@srvx_code
Reference Document
There are many other command as well. One
needs to have knowledge of Git irrespective of
domain.
Below mentioned are some documents which
can be helpfull.
Blog - https://www.hostinger.com/tutorials/basic-
git-commands
Youtube - https://www.youtube.com/watch?
v=RGOj5yH7evk
www.srvx.co.in
Saurav Singh
(Content Creator)
@srvx_code
www.srvx.co.in