Recently I was working on a git repository setup on my local and had a task of getting all the modified and changed files in a tar.(Remember I had not committed my changed files).Even if you have you can use the corresponding commit id to get list of changed files in that commit
Here is the command I used to extract modified and added files in a GIT repository
Here is the command I used to extract modified and added files in a GIT repository
git diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT $commit_id | xargs tar -rf mytarfile.tar
No comments:
Post a Comment