# msgid "" msgstr "" msgid "" "title: Search in git\n" "date: 2020-08-16\n" "layout: post\n" "lang: en\n" "ref: search-in-git" msgstr "" msgid "Here's a useful trio to know about to help you search things in git:" msgstr "" msgid "`git show `" msgstr "" msgid "`git log --grep=''`" msgstr "" msgid "`git grep '' [commit]`" msgstr "" msgid "1. `git show `" msgstr "" msgid "Show a specific commit and it's diff:" msgstr "" msgid "2. `git log --grep=''`" msgstr "" msgid "Search through the commit messages:" msgstr "" msgid "3. `git grep '' [commit]`" msgstr "" msgid "Search content in git history:" msgstr "" msgid "" "And if you find an occurrence of the regexp in a specific commit and you " "want to browse the repository in that point in time, you can [use git " "checkout for that][0]." msgstr "" msgid "" "[0]: {% link _tils/2020-08-14-browse-a-git-repository-at-a-specific-" "commit.md %}" msgstr "" msgid "" "git show\n" "# shows the latest commit\n" "git show \n" "# shows an specific \n" "git show v1.2\n" "# shows commit tagged with v1.2\n" msgstr "" msgid "git log --grep='refactor'\n" msgstr "" msgid "" "git grep 'TODO'\n" "# search the repository for the \"TODO\" string\n" "git grep 'TODO' $(git rev-list --all)\n" "# search the whole history for \"TODO\" string\n" msgstr ""