git的一些常用命令

tech2025-07-10  5

git的一些常用命令

查看分支:git branch

创建分支:git branch name

切换分支:git checkout name

创建+切换分支:git checkout –b name

合并某分支到当前分支:git merge name

删除分支:git branch –d name

git branch -a 查看分支,如果下边有remote才对

git remote -v 查看远程仓库的地址

git push -u origin name 指定上传到某个分支

git remote remove origin 删除远程分支

git remote add origin https://github.com/wangkun370/ceshi.git(你的git仓库地址) 添加远程分支

最新回复(0)