ART
ART

Reputation: 1569

how to take a backup of untracked files in the git

I have a situation wherein I have to take a huge list of un-tracked file and copy it to some backup folder.

I know we can stash un-tracked file using git stash -u but I don't want that.

I just want it to be copied to local folder in filesystem.

Is that possible ?

Upvotes: 2

Views: 355

Answers (1)

VonC
VonC

Reputation: 1324537

You can list files that are untracked (and not ignored)

git ls-files --others --exclude-standard

From there, you can copy each one to a backup location.

Upvotes: 3

Related Questions