List only git tags where specific file was changed

Asad ali

I have a Git repo with two files, index1.js and index2.js. There are multiple commits with tags and one or both files changed in those commits. I want to list the tags in which only index1.js was changed.

I tried this but it returns a decorated output with commit message, Date etc. But I only want tags list.

git log -p --name-only --decorate index.js

I want an output like this:

 1. v1.1
 2. v1.2
 3. v1.5
EncryptedWatermelon

Super ugly but it works

git log --decorate --tags index.js | grep tag: | awk {'print $4'} | sed -e 's/)$//'

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to show changed file list by a specific author in a Git repository?

git - get only changed files for specific branch

Trigger jenkins build if only a specific file is changed

Git fetch tags only on a specific branch?

How can I list commits for a specific file including all changed files in Git?

Git Merge only changed files from a specific commit (not the entire diff)

List all files in a directory not changed by a specific git commit

Get a list of changed files and their status for a specific Git commit

List all files changed by a specific user in a Git repository

git list of files changed between two tags along with intermediate tags changes

Finding every merge/commit in git where a file changed

Showing the total changed words in a git tracked file relative to a specific date

Git CI - How to check that a specific file changed on a new version?

How to run github action only when a specific file is changed

Git & Intellij, How do I commit only parts of a changed file

Stash only one file out of multiple files that have changed with Git?

How to show changed file name only with git log?

How can I list all commits that changed a specific file?

How to list only the file names that changed between two commits?

git-tag list only those tags that are at or below current HEAD

List untracked files only by specific file type

Find diff between MySQL tables, only returning rows where a specific column has changed

git: list dangling tags

How do I list git branches with commits only to a specific directory?

List all changed files in git repo from the beginning of master up to specific commit

Git show only the message for the latest commit of a specific file in a branch

Git checkout branch but file changed

pytest run only the changed file?

Can I make 'git diff' only the line numbers AND changed file names?