diff --git a/README.md b/README.md index ae9540c..b1f09eb 100644 --- a/README.md +++ b/README.md @@ -155,6 +155,7 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`. * [Exclude author from logs](#exclude-author-from-logs) * [Generates a summary of pending changes](#generates-a-summary-of-pending-changes) * [List references in a remote repository](#list-references-in-a-remote-repository) +* [Backup untracked files.](#backup-untracked-files) @@ -1057,5 +1058,10 @@ git request-pull v1.0 https://git.ko.xz/project master:for-linus git ls-remote git://git.kernel.org/pub/scm/git/git.git ``` +## Backup untracked files. +```sh +git ls-files --others -i --exclude-standard | xargs zip untracked.zip +``` + diff --git a/tips.json b/tips.json index 10eea9f..5e73ee3 100644 --- a/tips.json +++ b/tips.json @@ -455,4 +455,7 @@ }, { "title":"List references in a remote repository", "tip": "git ls-remote git://git.kernel.org/pub/scm/git/git.git" +}, { + "title": "Backup untracked files.", + "tip": "git ls-files --others -i --exclude-standard | xargs zip untracked.zip" }] \ No newline at end of file