
When it comes to version control systems, there are few software that can beat GIT in performance and relevance. GIT was developed by Linus Torvalds in 2005 and today, millions of companies use it for efficient code management and version control of their projects. Open source software is available for download for Linux, Windows, Solaris and Mac platforms.
git configOne of the most used git commands, email, username and file format etc. git config, which can be used to set user-specific configuration values such as the preferred algorithm for example, the following command can be used to set up email:
git config --global user.email root@baransel.dev
git initThis command is used to create a new GIT directory. Sample:
git init
git addThe git add command can be used to add files to the directory. For example, the following command will index a file named README.md located in the local directory:
git add README.md
git cloneThe git clone command is used for directory checking purposes.
If the directory is located on a remote server, use:
git clone baransel@91.128.110.48:/path/to/repository
git commitThe git commit command is used to commit changes to the head. Note that not all committed changes will go to the remote directory. Example:
git commit –m "Message related to commit."
git statusThe git status command displays a list of files that have not yet been added or that have been changed along with the committed files. Example:
git status
git pushgit push is another of the most used basic GIT commands. With a simple push, it pushes the changes made to the master branch of the remote directory associated with the working directory. Example:
git push origin master
git checkoutContinue this post on my blog! A Git Cheat Sheet.