Git is a distributed version-control system for tracking changes in any kind of files in project, It is specially designed for distributing coordinating Software code among multiple programmers [any Software Language] & cooperating on source code during Software development / designed.
Its provides following below things during Software Development /
Designed
Performance
Flexibility
Security
Data integrity
Code distribution
Non-linear workflows
Command | Description | |
1 | git config | This command is used to set the author name and email address respectively user to be used with your commits. |
2 | git init | This command is used to start a new repository for specific project |
3 | git clone | This command is used to get project files from a specified Repository URL |
4 | git add | This command is used to add file in specified Branch |
5 | git commit | This command is used to check that the file changes has been saved to the local repository |
6 | git diff | This command is used to differentiate between Files / Branches |
7 | git reset | This command is used to discard any changes made after your commit, your local repository will remain same as previous |
8 | git status | This command is used to display list of all the files those have to be committed. |
9 | git rm | This command is used to remove a file from a Git repository as well as file from your system working git directory and then removes it from the list of files tracked by a Git repository |
10 | git log | This command is used to display list of all history the commits made to a Git Repository |
11 | git show | This command is used to display one or more objects (blobs, trees, tags and commits) |
12 | git tag | This command is used to Label/Mark for a specified commit, this like a Identifier Commit for future reference. |
13 | git branch | This command is used to display all the branches in the current Git Repository. |
14 | git checkout | This command is used to switch from one branch to another. |
15 | git checkout -b | This command is used o create a new branch and also switches to it. |
16 | git merge | This command is used to merge the branches in the current working Git Repository Branch |
17 | git remote | This command is used to connect your local Git Repository to the remote server Git Repository |
18 | git push | This command is used to send all changed & committed files code from local Repository to Remote Git Repository Branch |
19 | git pull | This command is used to fetch and merge changes from Remote Git Repository server to your working system directory. |
20 | git stash | This command is used for temporarily saved (stored locally) all modified files in the current working directory & allow to switch branches without committing to the current branch |
21 | Git hooks | This command are shell scripts that perform automated actions when a specific action is performed, as pull, push, commit |
There are following below important set of Git Commands
- git config
- git init
- git clone
- git add
- git commit
- git diff
- git reset
- git status
- git rm
- git log
- git show
- git tag
- git branch
- git checkout
- git merge
- git remote
- git push
- git pull
- git stash
Details as below.
[1] – git config
This command is used to set the author name and email address respectively user to be used with your commits.
[2] – git init
This command is used to start a new repository for specific project
[3] – git clone
This command is used to get project files from a specified Repository URL
[4] – git add
This command is used to add file in specified Branch
[5] – git commit
This command is used to check that the file changes has been saved to the local repository
[6] – git diff
This command is used to differentiate between Files / Branches
[7] – git reset
This command is used to discard any changes made after your commit, your local repository will remain same as previous
[8] – git status
This command is used to display list of all the files those have to be committed.
[9] – git rm
This command is used to remove a file from a Git repository as well as file from your system working git directory and then removes it from the list of files tracked by a Git repository
[10] – git log
This command is used to display list of all history the commits made to a Git Repository
To exit git log, type “q” or “z”. Or type “h” to seek for help
[11] – git show
This command is used to display one or more objects (blobs, trees, tags and commits)
[12] – git tag
This command is used to Label/Mark for a specified commit, this like a Identifier Commit for future reference.
[13] – git branch
This command is used to display all the branches in the current Git Repository.
[14] – git checkout
This command is used to switch from one branch to another.
git checkout -b
This command is used o create a new branch and also switches to it.
[15] – git merge
This command is used to merge the branches in the current working Git Repository Branch
[16] – git remote
This command is used to connect your local Git Repository to the remote server Git Repository
[17] – git push
This command is used to send all changed & committed files code from local Repository to Remote Git Repository Branch
[18] – git pull
This command is used to fetch and merge changes from Remote Git Repository server to your working system directory.
[19] – git stash
This command is used for temporarily saved (stored locally) all modified files in the current working directory & allow to switch branches without committing to the current branch
[20] – Git hooks
This command are shell scripts that perform automated actions when a specific action is performed, as pull, push, commit
The below Git command picture displays summary of Top most using Git Commands