git 分支tag修改推送

来源:互联网 发布:如何安装node sass 编辑:程序博客网 时间:2024/06/13 18:56

重新修改commit

git commit --amend(很实用的命令)

远程分支

//查看本地和远端分支git branch -a//删除远端分支|tag(在github上删除是禁止删除默认分支的,可以在Setting页面,设置Default Branch为其他分支后删除)//git版本需要大于1.7.0git push origin --delete branchNamegit push origin --delete tag tagName//所有版本git push origin :branchName //分支git tag -d tagNamegit push origin :refs/tags/tagName //tag//重命名本地分支git branch -m branchName (当前分支)git branch -m oldBranchName newBranchName(其他分支)

git push 单个commit

git push origin commitId:masterps 可以用git rebase -i commitId修改本地提交顺序后 push

重设url(三种方式)

  • 修改命令

git remote origin set-url [url]

  • 先删后加

git remote rm origin
git remote add origin [url]

  • 直接修改config文件
原创粉丝点击