1.git本地配置
在指定目录新建一个Git代码库
$ git init
clone下载一个项目和它的整个代码历史
$ git clone [url]
配置
显示当前的Git配置
$ git config --list
设置提交代码时的用户信息
$ git config [--global] user.name "[name]"
$ git config [--global] user.email "[email address]"
2.提交本地代码
查看当前分支修改
$ git status
添加当前目录的所有文件到暂存区
$ git add .
提交暂存区到仓库区
$ git commit -m [message]
在push本地仓库员代码之前,取回远程仓库的变化,并与本地分支合并,防止吧远程仓库修改的代码覆盖掉
$ git pull [remote] [branch]
上传本地指定分支到远程仓库
$ git push [remote] [branch]