markdown git将本地分支推送到新的远程分支

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown git将本地分支推送到新的远程分支相关的知识,希望对你有一定的参考价值。

## push local branch to new remote branch

### Sets the new remote, see [Adding a remote](https://help.github.com/articles/adding-a-remote/) for more
```
//ex: git remote add origin remote https://github.com/ronsun/PagedListWithSizeTemplate.git/
//-u is short for --set -upstream 
git remote add origin remote repository URL
```


### Verifies the new remote URL
```
git remote -v
```

### Push to exist remote, see: [Pushing to a remote](https://help.github.com/articles/pushing-to-a-remote/) for more
```
git push origin master
```

## appendix
### Remove the remote if added a incorrect remote
```
git remote rm origin
git remote rm origin git@github.com:username/myapp.git
```

以上是关于markdown git将本地分支推送到新的远程分支的主要内容,如果未能解决你的问题,请参考以下文章

sh 如何将新的本地分支推送到远程Git存储库并跟踪它?

git怎么将本地仓库推送到一个新的远程分支包含所有历史提交信息

git 创建分支并推送到远程

text Git:将新的本地分支推送到远程

将本地已存在项目第一次推送到远程git

git 创建分支并推送到远程分支