Last active
February 20, 2024 23:57
-
-
Save adenosinew/af326d8b4212c0caf15d2d7c938cbb01 to your computer and use it in GitHub Desktop.
[Git commands]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://stackoverflow.com/questions/5188320/how-can-i-get-a-list-of-git-branches-ordered-by-most-recent-commit | |
git for-each-ref --sort=-committerdate refs/heads/ | |
# Or using git branch (since version 2.7.0) | |
git branch --sort=-committerdate # DESC | |
git branch --sort=committerdate # ASC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Tell git which ssh key to use | |
#Configuration core.sshCommand: | |
#From Git version 2.10.0, you can configure this per repo or globally, | |
git config core.sshCommand "ssh -i ~/.ssh/id_rsa_example -F /dev/null" | |
git pull | |
git push |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment