In this post, I am explaining on Git Cheat Sheet. Few applications can compare to GIT in terms of performance and relevancy when it comes to version control systems. Linus Torvalds created GIT in 2005, and it is now used by millions of enterprises for efficient code management and version control. For Linux, Windows, Solaris, and Mac, open-source software is available for download.
One of the most commonly used git commands, email, username, and file format, among others, is git config, which may be used to establish user-specific configuration parameters such as the preferred algorithm, for example. To set up an email, use the following command:
git config --global user.email [email protected]
To create a new GIT directory, run this command. Sample:
To add files to the directory, use the git add command. The following command, for example, will index a file named README.md in the local directory:
git add README.md
The git clone command is used to inspect the directory structure. If the directory is on a remote server, use the following syntax:
git clone [email protected]:/path/to/repository
To commit changes to the head, use the git commit command. It’s worth noting that not all committed modifications will be replicated in the remote directory. Example:
git commit –m "Message related to commit."
Along with the committed files, the git status tool displays a list of files that have not yet been added or updated. Example:
Another of the most commonly used GIT commands is git push. It pushes the modifications to the master branch of the remote directory connected with the working directory with a single push. Example:
git push origin master
Continue this post on my blog! A Git Cheat Sheet.