For Git 1.x
1 |
$ git add -u |
This tells git to automatically stage tracked files — including deleting the previously tracked files. For Git 2.0 To stage your whole working tree:
1 |
$ git add -u :/ |
To stage just the current path:
1 |
$ git add -u . |
from:https://blog.csdn.net/dahailantian1/article/details/79475644
View Detailsgit remote set-url命令修改remote URL git remote set-url传递两个参数 remote name。例如,origin或者upstream new remote url。例如,git@github.com:USERNAME/OTHERREPOSITORY.git 例如:从SSH切换到HTTPS的远程URL 打开终端 切换到你项目的工作目录 列出remotes,是为了得到你想要改变的remote的名字
1 2 3 |
xxxxxx@xxxxxx:~/workspace/goal$ git remote -v origin git@github.com:xxxxxx/SpringBoot.git (fetch) origin git@github.com:xxxxxx/SpringBoot.git (push) |
使用git remote set-url命令从SSH到HTTPS的远程URL
1 |
xxxxxx@xxxxxx:~/workspace/goal$ git remote set-url origin https://github.com/xxxxxx/SpringBoot.git |
验证是否改变成功
1 2 3 |
xxxxxx@xxxxxx:~/workspace/goal$ git remote -v origin https://github.com:xxxxxx/SpringBoot.git (fetch) origin https://github.com:xxxxxx/SpringBoot.git (push) |
from:https://www.cnblogs.com/yandufeng/p/6423821.html
View Details