天天看點

Git使用基礎

<a target="_blank" href="http://git-scm.com/download/">http://git-scm.com/download/</a>

<a target="_blank" href="http://git-scm.com/downloads/guis">http://git-scm.com/downloads/guis</a>

<a target="_blank" href="http://www.eclipse.org/egit/">http://www.eclipse.org/egit/</a>

配置使用者名及郵箱

建立本地版本庫

1.為~\myrep目錄建立版本庫,在該目錄下會建立一個隐藏的版本庫檔案夾。 

2.在版本庫中建立預設主分支 master。 

3.将目前的工作目錄指針head指向master分支。

分支操作

送出修改到版本庫

需要送出的檔案修改通通先通過add指令放到暫存區,然後通過commit指令一次性送出暫存區的所有修改。

檢視目前版本庫檔案修改狀态

比較 版本庫中檔案 和 工作區的檔案

日志

回退

撤銷

從版本庫中删除檔案。

工作區操作

git 遠端庫位址有3種形式

<a target="_blank" href="https://github.com/xixihe/hello-world.git">https://github.com/xixihe/hello-world.git</a>

[email protected]:xixihe/hello-world.git

<a target="_blank" href="https://github.com/xixihe/hello-world">https://github.com/xixihe/hello-world</a>

遠端庫操作

<a target="_blank" href="http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000">git簡易教程</a>

繼續閱讀