# Git Submodule 管理

If you haven’t yet commited the changes, then:

But sometimes it happens that part of the stuff you’re doing are new files that are untracked and won’t be in your git diff output. So, one way to do a patch is to stage everything for a new commit (git add each file, or just git add .) but don’t do the commit, and then:

Add the ‘binary’ option if you want to add binary files to the patch (e.g. mp3 files):

You can later apply the patch:

Note: You can also use --staged as a synonym of --cached.

generate_patches.sh

apply_patches.sh