Git is the most commonly used Repository to maintain a distributed version control (DVCS) system for tracking source code in software development.
There are two types of Version Control Systems:
- Centralized Version Control System (CVCS)
- Distributed Version Control System (DVCS)
SVN is the example for CVCS developed by Apache Subversion.
Popular companies that use Git for version control are Facebook, Twitter, Yahoo, Quora, Salesforce, Microsoft and many more.
GIT commands
git init
This command is to create a git repository for a project.command: git init <root-folder>
git status
This command gives the current status of the repository.git status command will return the list of files in the staging area. If there are no changes it will show nothing to commit, working dictionary clean.
git pull
This command is used to get the latest version of the repository.git checkout
This command is to check out a branchcommand: git checkout <branch-name.
git add
This command is to add changes to the current dictionary.command: git add *
git commit
This command is to commit your changes to the local head but not to the remote repositorycommand: git commit -m "commit message here"
git push
git branch
This command gives a list of all existing branches. It will show the * for the current branch.git merge
To merge the specified branch history into the current branch.command: git merge <branch-name>
git remote
To connect your local repository to the remote server.command: git remote add <variable name> <Remote Server Link>
Please feel free to comment or Contact Us for more info.
0 Comments