git init
在当前目录执行,会生成.git
目录文件,这个和SVN一致。
git commit -m "first commit"
-m
:表示提交描述,必须要填。
git remote add origin [email protected]:test/test.git
git push -u origin master
直接从远端把代码克隆下来。
git clone [email protected]:test/test.git
git status
$ git status
On branch master
Initial commit
Untracked files:
(use "git add <file>..." to include in what will be committed)
README.md
nothing added to commit but untracked files present (use "git add" to track)
git pull
就等同下面。
git fetch
git merge