Created
October 28, 2013 18:17
-
-
Save pcarrier/7201805 to your computer and use it in GitHub Desktop.
Git snapshot to be pushed to a temporary ref
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| TMP_INDEX="`mktemp .git/tmp_index.XXXXXX`" | |
| trap "rm -f \"$TMP_INDEX\"" EXIT | |
| rm -f "$TMP_INDEX" | |
| GIT_INDEX_FILE="$TMP_INDEX" git add --all | |
| TREE_ID=`GIT_INDEX_FILE="$TMP_INDEX" git write-tree` | |
| COMMIT_ID=`echo "snapshot"|git commit-tree $TREE_ID` | |
| echo $COMMIT_ID |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment