Skip to content

Instantly share code, notes, and snippets.

View danaronoff's full-sized avatar

Daniel Aronoff danaronoff

  • Integral Partners, LLC
View GitHub Profile

Keybase proof

I hereby claim:

  • I am DANARONOFF on github.
  • I am danaronoff (https://keybase.io/danaronoff) on keybase.
  • I have a public key whose fingerprint is AD5E 37FC 4511 4325 EA4A 8A52 DE37 4E17 A7A4 4EB0

To claim this, I am signing this object:

@danaronoff
danaronoff / git-export-changes-between-two-commits.md
Created June 13, 2018 16:30 — forked from mrkpatchaa/git-export-changes-between-two-commits.md
Git command to export only changed files between two commits

Use case : Imagine we have just created a project with composer create-project awesone-project (currently V0.2). 2 weeks later, there is a new release (V0.3). How to update your project ? Since composer update only updates the project dependencies, it is not what we are looking for. Composer doesn't know about awesome-project since it's not in our composer.json.

After trying many git solutions, I've come to this :

git archive --output=changes.zip HEAD $(git diff --name-only SHA1 SHA2 --diff-filter=ACMRTUXB)

This command will check for changes between the two commits and ignore deleted files.