Skip to main content

Git Quickie: Branch Comparison

Get simple list of changed files

Published 1 min readMarkdown
Part of seriesGit Quickies
Git Quickie: Branch Comparison

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 :)

About the author

  • 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.

No comments yet. Be the first to comment.

Git Quickies

Part 3 of 3

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

Start from the beginningGit Quickie: ChangelogQuick git command to generate simple changelog