git最基础常用操作

单人开发托管够用 未列出的用到一个补一个🥽

正常操作

克隆项目 -- git clone + 地址

查看状态 -- git status

把所有修改的加到到本地 -- git add .

提交到本地 -- git commit -m '备注'

以master提交到服务器 -- git push -u origin master

将远程仓库和本地连接 -- git remote add origin + 地址

分支操作

查看分支

git branch

创建分支

git branch <name>

切换分支

git checkout <name> 或者 git switch <name>

创建+切换分支

git checkout -b <name>或者 git switch -c <name>

合并某分支到当前分支

git merge <name>

删除分支

git branch -d <name>

posted @ 2020-04-09 17:26  CoderZjz  阅读(183)  评论(0编辑  收藏  举报