git 常用基本操作

git基本操作命令

1、git init 初始化,在当前目录生成一个.git文件

2、git add . 添加当前路劲所有文件

3、git commit -am "提交建议" 提交上一步添加的文件到本地仓库

4、git remote add origin [email protected]:repos/xxx/xxx/xxx.git 增加远程仓库地址

5、git branch test 创建本地名叫"test"的分支

6、git branch 罗列本地所有分支

7、git checkout test 切换本地分支到test

8、git push origin test:test 提交本地分支test到远程分支test上

猜你喜欢

转载自chenshangge.iteye.com/blog/2357006