git

作者: igor_d140 | 来源:发表于2018-11-29 12:14 被阅读6次

git push -d origin branchName // 删除远程分支

git checkout -b newBranchName // 新建本地分支

git push -u origin branchName // 本地新分支

git branch -d <BranchName>// 删除本地分支

// 推送本地代码到已有仓库
1、创建.git
git init // 本地无.git,有则先删除.git
2、关联远程仓库master分支
git remote add origin https://..... <远程仓库地址>
3、同步远程仓库master分支
git pull origin master
4、添加本地所有代码
git add .
5、提交本地代码到暂存区
git commit -m 'first commit'
6、推送到远程仓库
git push -u origin master

// 新建远程分支
1 新建本地分支
git checkout -b newBranchName

2 推送到远程仓库
git push -u origin branchName

相关文章

网友评论

      本文标题:git

      本文链接:https://www.haomeiwen.com/subject/dwgxcqtx.html