Skip to main content

Command Palette

Search for a command to run...

Git Quickie: Branch Comparison

Get simple list of changed files

Published
1 min read
Git Quickie: Branch Comparison
D

Software Engineer with passion in frontend who specializes in Angular but doesn't hesitate to check on other sides - configuring CI/CD, clouds, backend and API, mobile development using Flutter, and so on.

If you want to check what has been changed, you usually use git diff one-branch another , right?

But the problem is that it produces a lot of output that in some cases is not needed.

So there is a nice shortcut in case you want to compare two branches quickly without caring about commits. The --name-only param will list the file names that are different:

git diff --name-only dev main

How often do you check diff? What are the most common use cases for it? I did this only once or twice in console but it was fun :)

Git Quickies

Part 1 of 3

In this series I'll be sharing some quick git commands that could be useful from time to time

Up next

Git Quickie: Skip Tracking

Remove specific change from git tracking