Git notes

delete branch remotely

to delete local/remote branch "newfeature":

local:
git branch -d newfeature

remote:
git push origin :newfeature

export changed file of last commit to tar:
git diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT HEAD | xargs tar czvf last_commit.tar.gz

export changed file between two commit
git diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT tag1 tag2 | xargs tar czvf last_commit.tar.gz 


last commit deleted files
git diff-tree -r --no-commit-id --name-only --diff-filter=D HEAD

 

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.