Feb 15 2012

GIT – List of changed files between master and branch

While migrating all my repos to GIT i found myself discovering new ways of work with git, i’ll try to past them on this blog as own notes.

Need: A list of changed files on my <branch> comparing to master

git branch <your branch> // Switch to branch
git pull origin master // Sync master changes inside your branch
git diff --name-only master <branch> // List of the changed files
Probably there is a nicer way to achieve this, let me know if you find any other

3 comments on “GIT – List of changed files between master and branch

  1. If you are on the branch you wish to compare with master you don’t need the name of your current branch. You can just do:

    git diff –name-only master

    That way you can also create an alias for it easily:

    git config –global alias.diffm “diff –name-only master”

    And now the command is:

    git diffm

    Jay Pete on said:
  2. And the comment system apparently has a bug, so double dashes (- and another -), only appears as a single -.

    So in order to make the above work, these start with two dashes:

    –name-only
    –global

    Jay Pete on said:
  3. Being passionate about your topic usually reflects in the quality of what you post and this is something readers enjoy and appreciate. Many couples dream of the day when their children are out of the house, so that they can buy an RV and travel the country.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>