R
R
Rukis2019-02-03 17:50:55
git
Rukis, 2019-02-03 17:50:55

Git - how to find out if there have been changes in certain files?

The task is this: to find out whether there have been changes in certain files and directories of the current branch since its creation. The command will be executed by a bash script.
There is, for example, such a command:
git diff --name-only master -- dirname
It gives practically what is needed, but the changes made to the branch with which it is being compared are also taken into account. And you need to find out if there have been changes in the current one.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
youngmysteriouslight, 2019-02-15
@youngmysteriouslight

git diff --name-only $(git merge-base <текущая ветка> master) -- dirname

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question