Skip to content

Instantly share code, notes, and snippets.

@vaderj
Last active February 25, 2020 22:19
Show Gist options
  • Save vaderj/5907595d79ccccb603cf13e45da4ef92 to your computer and use it in GitHub Desktop.
Save vaderj/5907595d79ccccb603cf13e45da4ef92 to your computer and use it in GitHub Desktop.
#git Cheat sheet and troubleshooting git
From the root of your project folder
1.) git init
2.) git add .
3.) git commit -m "initial commit"
(the next two are from DevOps once the Repo has been established)
4.) git remote add origin https://tenant@dev.azure.com/tenant/ProjectName/_git/ProjectName
5.) git push -u origin –all
To update the repo from your local project :
1.) git add . ;
2.) git commit -m "update comment" ;
3.) git push -u origin --all ;
To reset your local project from the repo:
1.) git fetch origin
2.) git reset –hard origin/master
TROUBLESHOOTING:
If Git throws an error about SSL errors (this resolved issue complaining about self signed cert):
1.) git config --global http.sslVerify false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment