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将本地分支推送到新的远程分支的主要内容,如果未能解决你的问题,请参考以下文章