Git收藏

来源:互联网 发布:淘宝退货卡怎么填写 编辑:程序博客网 时间:2024/05/17 04:10

怎么修改Git remote add时使用的远程仓库?

三种方式都可以。

1. 修改命令
git remte origin set-url URL

2.先删后加
git remote rm origin
git remote add origin git@github.com:Liutos/foobar.git

3. 直接修改config文件


简易的命令行入门教程:

Git 全局设置:
git config --global user.name "perfectChao"git config --global user.email "xuchao1109@126.com"
创建 git 仓库
mkdir Hello_worldcd Hello_worldgit inittouch README.mdgit add README.mdgit commit -m "first commit"git remote add origin https://git.oschina.net/perfectChao/Hello_world.gitgit push -u origin master
已有项目?
cd existing_git_repogit remote add origin https://git.oschina.net/perfectChao/Hello_world.gitgit push -u origin master

0 0
原创粉丝点击