Jul 29, 2020

Git project setup



In the context of a new Salesforce project setup in Visual Studio Code (or outside of VSCode with any other platform code folder structure) the steps to follow for getting your project into a local and remote repository is as follows
1. Initialize git repo
git init

2. Set your user name
git config user.name "your username"

3. Set your checkin email identifier
git config user.email "your email address on github/bitbucket"

4. Add this folder structure to local git repo
git add .

5. When you are ready to commit
git commit --message "Commit Message / Ticket Number"

6. Up until this point, everything is local. Now lets add cloud repository (http or https)
git remote add origin https://username:password@github.com/accountname/reponame.git/
OR
git remote add origin http://username@cloudrepoApp.com/accountname/reponame.git/ (for password prompt)

7. Push code up to cloud repo
git push -u origin master

At any point you have to change username or password you can use the following and next time when you push or pull, git will ask for new password.
On Windows 
git config --global credential.helper wincred
On Mac
git config --global credential.helper osxkeychain
OR
git config --global --unset user.password

Whatsapp Button works on Mobile Device only

Start typing and press Enter to search