git: permanently store https credentials
$ git config --global credential.helper store
$ git config --global credential.helper store
Show some information about remote: $ git remote show <remote-name> $ git remote show remote1 List SHA-1 hash and branches: $ git ls-remote --heads <remote-name> $ git ls-remote --heads remote2
$ git remote set-url <remote-name> <new-url> $ git remote set-url origin https://github.com/user/repo.git
Push local branch to remote with different name: $ git push <remote> <local_branch_name>:<remote_branch_name> $ git push remote1 branch1:dev/test1
Undo last local (not pushed) commit: $ git reset --soft HEAD~1
B---C---D branch-1 / ---A \ E---F---G branch-2 $ git checkout branch-2 $ git rebase branch-1 B---C---D branch-1 / \ ---A E'--F'--G' branch-2
A---B---C branch-1 D---E---F branch-2 $ git checkout branch-2 $ git cherry-pick B A---B---C branch-1 D---E---F---B' branch-2