Git: how to compare to changesets without comitting them? -


given have code generation tool updates files in our working dir. run tool 2 different parameters , want understand difference brings. possible git somehow?

something has worked me like:

# make change git diff > first-try.patch  # make different change git diff > second-try.patch  interdiff first-try.patch second-try.patch 

the interdiff shows diff of diffs, useful. typically need patchutils installed on linux machine interdiff.

the other choice be:

# make change git commit -m "first try" # make note of commit id... call commit1  # restore tree git reset --hard head^ # make second change git commit -m "second try"  git diff commit1 head  # go original starting point. git reset --hard head^ 

i idea less, since can screw things if make mistake. it's easier in other ways (doesn't require interdiff, instance). note: might think can reference commit1 since back-pedaled, that's not true. git leave object around , clean later, long it's not being used after period of time.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -