A deliberately minimal set of commands for using GIT as simply as possible. Note:
git init
git status
git add .
git commit -m "describe change"
git status
git remote add origin URL_of_remote_repo_here
git remote -v
git push -u origin master
git clone URL_of_remote_repo_here
git add .
git commit -m "describe change"
git status
git push
git checkout -b branchname_here
git add .
git commit -m “describe change”
git push -u origin branchname_here
git checkout master
git diff master branchname_here
git merge branchname_here
git branch -a
(lists all branches)git branch -d
(use -D
to force delete)git log --pretty=oneline
git fetch origin
(override local changes)git reset --hard origin/master
git checkout -- filename_here
(restore previous version of file)git reset —hard HEAD~
(revert to previous commit)git clone URL_of_remote_repo
git remote set-url origin URL_of_NEW_repo
git remote -v