Reference - Git commands

Version control systems allow you to track all changes made to your codebase and enables you to do things like reverting to an old version of code, developing features separately without affecting other people's changes etc. There are many version control tools like Git, SVN/subversion etc. Git is a very popular version control system out there. It is a distributed version control system, ie - every user will have their own seprate copy of code and can continue development even if there is no connectivity to server. From Salesforce development perspective, using version control systems like git became more important than earlier with Salesforce DX(SFDX).

Basics

This article assumes that you know basics of git. Once you are familiar with basics, you can use this reference article to quickly find common git commands. If you want to go through basics of git please checkout this git guide.



Explanation

You need to have a very high level idea about git to use this reference article. Just search in the page to find commands for common operations like cloning repo, creating branch, committing code, reverting code, stashing code etc.


How to use

Install Git CLI corresponding to your operating system from git website. Start running commands from above command reference.

Please note that if you do not want to use command line git, you can always depend on git clients like Github Desktop, SourceTree, TortoseGit, GitKraken and more others


No comments:

Post a Comment