Git snippets

some of useful git snippets

Archiving Code

  1. Pack the difference

    git archive HEAD $(git diff $commit --diff-filter=d --name-only)
  2. Pack the modified files

    tar -cvf - $(git ls-files --m )

Leave a Reply

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