- git init :创建仓库(文件下会出现一个.git文件;)
- git status :显示工作树状态
- git add a.md(指定文件)/git add . (所有文件) :相当于将文件暂存到缓存区
- git commit -m ‘提交信息’ :真正的提交 (将缓存中的数据提交;)
- git pull origin master :(拉:把远程仓库的最新代码拉下来 origin :远程仓库 master :本地分支名)
- git push origin master: (推:把本地代码推到远程仓库 )
- git remote -v :查看远程仓库
- git remote add origin git@github.com:asd/test.git :添加远程仓库;
- git clone git@github.com:asd/test.git :拷贝项目
- git branch :查看分支
- git branch -a :查看所有分支
- git branch a :新建分支a
- git checkout a : 切换到分支a
- git config --global user.name :查git名字
- git config --global user.name “qwe” :修改git 名字
- git config --global user.email :查git email
- git config --global user.email “qwe@gmail.com” 修改git email