Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jlrdw's avatar
Level 75

Bitbucket and compare two local folders with Git

I use Bitbucket, and currently do the following:

  • Have a development folder under wamp, no git involved
  • Have a git folder where changes are copied to
  • I use Winmerge to do that, works great (it compares changes locally)
  • push the git folder to bitbucket

All works good. But instead of Winmerge is there a way to:

  • Have git do this on local, compare and update the git folder with development folder prior to push?

Or do most of you just have your local development as a local git repository (master)?

0 likes
6 replies
Snapey's avatar
Snapey
Best Answer
Level 122

work directly in git repository. You are adding unnecessary steps, and risking getting in a mess in the process.

1 like
jlrdw's avatar
Level 75

@snapey so just make my local development folder a local git repository also?

Never mind got it:

work directly in git repository

jlrdw's avatar
Level 75

As said I have used git for a while, but mostly pull, push, that sort of thing.

I am trying to find one git command that will give me a list of added, modified, and deleted files with folder structure.

This works for deleted:

git diff --diff-filter=D --name-only HEAD

this works for modified

git diff --name-only --diff-filter=M

Or one for just added and modified will work and I can run the deleted command separately.

I have tried at least 50 to 75 combinations of commands from stackoverflow.

I still haven't got one figured out for added files, this DOES NOT work

git diff --name-only --diff-filter=A

Looking to list like:

application/Core/AdminRoutes.php
nbproject/private/private.xml
Snapey's avatar

I use github's desktop application. It makes this dead obvious.

You don't need to change anything about your repository, just install the app and point it at your repository

1 like
jlrdw's avatar
Level 75

Thanks and if anyone lands here I found a command.

I searched google and stackoverflow 2 more hours.

This show all in working directory not committed yet.

git status --short

// to output to text file in windows

git status --short  > c:\yourfolder\changes.txt

//  not sure about linux and writing to text file.

At least 3 hours, git is tricky.

1 like
jlrdw's avatar
Level 75

An update that might help someone. I discovered TortoiseGit, I can actually right click and then click diff.

From there I can actually save any added and changed files to a staging folder.

This works great if you are still maintaining a bitbucket repository but you are still just FTPing up your changes.

And it does show deleted, but you have to manually of course delete them.

So far I love this program.

I use it on Windows.

1 like

Please or to participate in this conversation.