##recursive add all
git add --all
##commit
git commit -m "this is the commit message"
##squash
git reset --soft HEAD~2 && git commit
where 2 is the number of commits to squash
##create branch and checkout
git checkout -b branch-name
##push new branch to remote
git push -u origin branch-name
##undo a file change
git checkout -- thefilename
/d/gitrepos/my-project/web-api (master)
$ git remote -v
origin https://someone@bitbucket.org/project-name/web-api.git (fetch)
origin https://someone@bitbucket.org/project-name/web-api.git (push)
/d/gitrepos/my-project/web-api (master)
$ git remote rename origin deploy
/d/gitrepos/my-project/web-api (master)
$ git remote -v
deploy https://someone@bitbucket.org/project-name/web-api.git (fetch)
deploy https://someone@bitbucket.org/project-name/web-api.git (push)
/d/gitrepos/my-project/web-api (master)
$ git remote add origin http://some-user@git-on-private-network.somewhere.com/foo/~some-user/my-projectline-api.git
/d/gitrepos/my-project/web-api (master)
$ git push -u origin master
Counting objects: 28, done.
Delta compression using up to 12 threads.
Compressing objects: 100% (24/24), done.
Writing objects: 100% (28/28), 5.76 KiB | 589.00 KiB/s, done.
Total 28 (delta 7), reused 0 (delta 0)
To http://git-on-private-network.somewhere.com/foo/~some-user/my-projectline-api.git
* [new branch] master -> master
Branch master set up to track remote branch master from origin.
/d/gitrepos/my-project/web-api (master)
$ git remote -v
deploy https://someone@bitbucket.org/project-name/web-api.git (fetch)
deploy https://someone@bitbucket.org/project-name/web-api.git (push)
origin http://some-user@git-on-private-network.somewhere.com/foo/~some-user/my-projectline-api.git (fetch)
origin http://some-user@git-on-private-network.somewhere.com/foo/~some-user/my-projectline-api.git (push)
can then deploy git push -u deploy master
to update the public cloud branch monitored by Azure
see also https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes