2014-01-09 15 views

回答

5

創建一個別名:

git config --global alias.here '!git init . && git add . && git commit --allow-empty -m "Initialize repository"' 

然後使用它像

git here 

注意,我添加了--allow-empty選項git commit,這將讓空目錄這項工作還有一個與內容。

相關問題