Last active
January 24, 2021 12:44
-
-
Save Eomm/75999440b00d5579fd34c6c261b08e32 to your computer and use it in GitHub Desktop.
GIT Magic
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
// Review a GitHub Pull Request ID | |
git fetch origin pull/ID/head:foo | |
git checkout foo | |
// View all your stashes, also which you have deleted! | |
git fsck --unreachable | grep commit | cut -d ' ' -f3 | xargs git log --merges --no-walk | |
// Restore a deleted stash | |
git update-ref refs/stash da02442ffa1584b489dc37a0fcf70fb1b60d9d2c -m "Piuf no one is lost" | |
// Last tag | |
git describe --tags $(git rev-list --tags --max-count=1) | |
// Search tags | |
git tag --format='%(objectname) %(refname:strip=2)' --sort=-version:refname -l v1* | |
// Search logs between commit | |
git log --pretty=oneline HEAD...<commit id> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment