GIT Commands

Clone a branch

git clone https://github.com/charleyza/angular-master-class-starter.git

Display the current local branches and the head you are on

git branch

Switch to another branch

git checkout cool-branch-name

Clear modified files that have not been committed

git checkout -- *

Get anything new from the server

git pull

Show local changes

git status

Add anything new

git add .

Commit locally, view diff

git diff
git commit -m "commit message"

Push to remote

git push

Delete branch

git push -d origin [BRANCH NAME]

Update to self signed certificate

git config --global http.sslCAinfo "c:/data/certs/certname.crt"

--back to default if the above plows
git config --global http.sslCAInfo "C:\Program Files\Git\etc\pki\ca-trust\extracted\openssl\ca-bundle.trust.crt"

Leave a Reply