Skip to content

Commit 8c3c6d9

Browse files
authored
git remote set-url ...
1 parent fcc577f commit 8c3c6d9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

TinyCode1.md

+9
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,15 @@ $ git branch --delete master # delete a branch in local
160160
$ git push origin --delete master # delete a remote branch master, which is easier to remember than git push origin :<branchName>
161161
```
162162

163+
```
164+
git remote set-url origin https://[email protected]/a-boy/playmath #远程地址中带上用户名,Git 1.9以前的版本就会不再回应403 Forbidden而是询问密码
165+
git remote set-url --add origin [email protected]:a-boy/playmath.git # 源origin增加一个远程地址,实现两个repo同步
166+
git remote --verbose #查看所有的远程地址情况
167+
168+
git remote add giteeorigin [email protected]:a-boy/playmath.git #也可选择不增加源origin的远程地址,而另增一个源giteeorigin
169+
git push giteeorigin master # 推送到源giteeorigin
170+
```
171+
163172
### vagrant and Data Science at the Command Line
164173
http://datasciencetoolbox.org/
165174
Download and install VirtualBox, Vagrant, then

0 commit comments

Comments
 (0)