Skip to content

Instantly share code, notes, and snippets.

@nsforge
Created September 26, 2011 07:01
Show Gist options
  • Save nsforge/1241753 to your computer and use it in GitHub Desktop.
Save nsforge/1241753 to your computer and use it in GitHub Desktop.
Script to commit all current changes to the current git repo as well as all git submodules
#!/bin/bash
git submodule foreach "git add ."
git submodule foreach "git commit -m \"$1\""
git add .
git commit -m "$1"
@nsforge
Copy link
Author

nsforge commented Sep 26, 2011

To use, (assuming the script is in your PATH):

git_commit_all.sh "Added awesome new feature!"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment