Git - Showing which files have changed between two revisions

De openkb
Aller à : Navigation, rechercher

Sommaire

Questions

I want to merge two branches that have been separated for a while and wanted to know which files have been modified.

http://linux.yyz.us/git-howto.html http://linux.yyz.us/git-howto.html

The tools to compare branches I ve come across are:

    • git diff master..branch
    • git log master..branch
    • git shortlog master..branch

Was wondering if there s something like "git status master..branch" to only see those files that are different between the two branches.

Without creating a new tool, I think this is the closest you can get to do that now (which of course will show repeats if a file was modified more than once):

    • git diff master..branch | grep "^diff"

Was wondering if there s something I missed...

Answers

Try

$ git diff --name-status master..branchName

That should do what you need, if I understand you correctly.

Source

License : cc by-sa 3.0

http://stackoverflow.com/questions/822811/showing-which-files-have-changed-between-two-revisions

Related

Outils personnels
Espaces de noms

Variantes
Actions
Navigation
Outils