A new directory, ‘git_hug’, has been created; initialize an empty repository in it.
把 'git_hug' 這個新建的目錄變?yōu)橐粋€可以被 Git 管理的倉庫。
如果你準(zhǔn)備把一個本地目錄讓 Git 管理起來,要先做初始化工作。本地目錄可以是空目錄,也可以是已經(jīng)存有文件的目錄。
Git 倉庫的初始化命令是:
$ git init
該命令將創(chuàng)建一個名為 .git 的子目錄,這個子目錄含有 Git 管理倉庫時要用的文件,.git 是一個隱藏目錄,可以用 ls -a
查看。
http://wiki.jikexueyuan.com/project/githug-walkthrough/images/level-1-init.png" alt="第1關(guān) init" />