git archive -o update.zip stash $(git diff --name-only HEAD)
OR
zip update.zip $(git diff --name-only HEAD)
git reset --hard HEAD^
git push
# Show log histories
git reflog show
# replace [Number] to HEAD Index
git reset HEAD@{[Number]}
#!/bin/sh
set -e
git config -f .gitmodules --get-regexp '^submodule\..*\.path$' |
while read path_key path
do
url_key=$(echo $path_key | sed 's/\.path/.url/')
url=$(git config -f .gitmodules --get "$url_key")
git submodule add $url $path
done
# 不驗證 SSL 憑證
git config --global http.sslverify false
# 自動轉換換行符號
git config --global core.autocrlf true