将指定文件夹变成git仓库 1. 到要改变的文件夹下,输入命令: $ git init 2. 再把文件放进本地git仓库中: $ git add . 3. 也可以把 . 符号换成具体的文件名来进行添加文件操作。