Learn Git Basics for Salesforce Developers


What is Git?

Git is a version control system where you can store you source code in git repository. you can track changed made on your code compared with previous code.


What is workflow in git?

They are working directory , staging and git repository.
In working directory is nothing but you local system,where you can build,modify your code.
In Staging, Then you can move code into staging area.In order to move files we use commit operation
In git repository,By using push command we can move source code from local repository to git repository


What is workflow in git?

1. open click here to download
2. click on your operation type (Ex: I click on windows then it start downloading these git.exe file)
3. After downloading click on double click on it.
4.Install it
5. Now you sucessfully installed git in our local system.


Register a account in Github

register to create new account in github with below link. If you have already a git account then login into it.
https://github.com/ click on register or login.


Create new repository like image below

Click on Create Repository.

You have created a new repository in GitHub


How to use gitbash?

After installing ,Click on gitbash icon on you desktop and double click on it .
It will open a graphical interface to like below image


Type : git version
to check which version of git installed in your local machine and it tells that git installed properly in your local machine
pwd — it is used to directory path


mkdir Name — create directory with Name


cd Name — To enter into Name


Git configuration (username and password)


git config –global user.name “Bhanu”
git config –global user.email”bhanu@gmail.com”


git config –global –list


To find user name and email id


How to clone repository from github to your system?

git clone https://gihub.com/XXXXXXXX // To clone


git status (to know status)


echo ” Test Git file” >>start.txt // to create a new file in local


git add start.txt / to add file4


git status .. ///to know files in local folder


git commit -m “Adding start text file”


git push origin master // to add into server


git init name // create a folder


mate file name


git add . // to add all files in folder


rm -rf .git // to remove .git folder
rm -rf name of folder // to remove project


Get all cheat sheet for github in pdf 🙂


Download: SalesforceQA


Please comments us for more updates and share to other to help.
Keep Visiting us for more updates
Like us for more updates
Fb Page : ForceLearn
keep share to help others  😎 😎 😎