创建仓库与初始化

创建新的文件夹,进入文件夹

$ git init

检出远程仓库

$ git clone /path/to/repository 
$ git clone username@host:/path/to/repository

添加与提交

$ git add <filename>
$ git add *

$ git commit -m "代码提交信息"

推送到服务器

$ git push origin master

$ git remote add origin <server>