Diff for git submodules

If you are leveraging git submodule for Hugh themes and you are accustomed to using git diff to see what changes you made and totally forgot to commit, you will need to tweak your command for git submodules. By appending --submodule=diff you will see diffs for submodules as well:

$ git diff --submodule=diff

You can run this command at your top level repo and see all changes in that repo plus submodule(s) or cd into a specific submodule and see see the diffs for those changes only.

About Andrew Hoog
I like to tinker in mobile forensics, security, tools development and nodejs. I’m an author, inventor, expert witness and co-founder of NowSecure.