Artikel Tagged ‘patch’

Git diff

23. August 2015 Keine Kommentare

Sometimes it’s necessary to apply a single commit done in Git repository to another project and output file produced git format-patch may be unsuitable for this when another project uses a different VCS. In such situation we can generate a patch using git diff command. It will produce a standard patch file in unified format:

git diff 411fde71965dd79900f553b28655f4c751744505^ 411fde71965dd79900f553b28655f4c751744505 > PATCH

We can apply PATCH with a standard patch command:

patch -p1 < PATCH
Kategoriengit, patch Tags: ,