Helpful git fixes: https://ohshitgit.com/
GIT_CURL_VERBOSE=1 GIT_TRACE=1 git …
git clone https://host/path/to/repo [location]
git clone ssh://<user>@<hostname>:<port>/path/to/repo.git [location]
git checkout -b <local-name> <remote>/<remote-name>
git checkout -t -b <local-name> <remote>/<remote-name> # Check out and set up tracking
git push <remote> <local-name>
git push <remote> <local-name>:<remote-name>
git push -u <remote> <local-name>:<remote-name> # Set up tracking for the local repo
git update-index --chmod=(-|+)x <file>
git reset --hard
git checkout -- <file>
git ls-remote --heads <git-url>
git ls-remote --tags <git-url>
git reset HEAD~ # undo commit, but don't touch working tree
# do changes
git commit -c ORIG_HEAD