0

Using git I would like to monitor that branch developpers are working on separate files or at least I want to check that common modified files are the correct ones.

using different tools (tortoise or smartgit for instance), if I select two commit in separate branches I can see :

added files removed files modified files

but a "modified" files don't mean that both commit (and their predecessor) modified the file. maybe only one branch modified the file (and it is not a problem).

if would like to do it manually I need to : make a diff between commit A in branchA with the source of branchA/branchB (= SOURCE) => list all modified files make a diff between commit B in branchB with the source of the branchA/branchB (= SOURCE) => list all modified files

and then check if there are common file that are modified in each list.

isn't there a command that could do it by itself ?

jonrsharpe
123k31 gold badges278 silver badges489 bronze badges
asked Feb 3, 2025 at 17:12
4
  • 1
    join <(git diff --name-only A...B) <(git diff --name-only B...A) Commented Feb 3, 2025 at 18:44
  • so you confirm there is no direct git command to do that. no one is annoyed with modification of identical files ? people discover lately that merge will be done and it is normal work ? Commented Feb 4, 2025 at 10:31
  • 1
    Well, the reason you need to know this is because you're going to do a merge, right? So, yeah. Duplicating what you can already do with an existing command is a kinda low-priority task, a minor convenience, not anything high on the urgency pile. "Merge will be done and this is normal work" sounds like there might be something lost in translation but what made it through sounds right, teams get larger, merges get more common, this is absolutely normal. Commented Feb 4, 2025 at 15:35
  • Thanks for your confirmation : no need to monitor possible merge ! Best regards Commented Feb 4, 2025 at 22:00

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.