- git remote -v //查看远程仓库地址
- git remote show origin //可以查看remote地址,远程分支,还有本地分支与之相对应关系等信息。
- git branch -d feature //删除本地feature分支
- git push origin :newBranch //(分支名前的冒号代表删除),删除远程分支newBranch
- git push origin --delelte branchname // 删除远程分支
- git branch newBranch //在本地新建一个分支
- git checkout newBranch //切换到你的新分支
- git checkout -b newBranch //创建并切换到新分支
- git push origin newBranc //将新分支发布到远程仓库
- git push --set-upstream origin branchName // 将当前本地分支关联到某一个远程分支
- git diff dev master --stat; 统计差别
git 的相关操作命令
最新推荐文章于 2024-07-16 09:37:43 发布