沉冰浮水

沉冰浮水

做最终到的事,成为最终成为的人!
github
bilibili
mastodon
zhihu
douban

「Git_笔记」git remote 命令

经常是先克隆了原始项目查看,然后发现需要作些修改,就需要 Fork 到自己账号下一份,所以要再修改一下远程仓库地址;

涉及命令为:git remote

# 查看远程仓库

git remote -v
# origin  [email protected]:BrowserSync/browser-sync.git (fetch)
# origin  [email protected]:BrowserSync/browser-sync.git (push)

# 重命名远程仓库

git remote rename origin BrowserSync
git remote -v

# 添加远程仓库

git remote add wdssmq [email protected]:wdssmq/browser-sync.git
git remote -v

# 获取并查看分支信息

git fetch --all
git branch -a

# -a 命令不懂啥用处

# git fetch -a

# 设置默认仓库

git config branch.master.remote wdssmq

# 下边命令可以直接修改远程仓库地址

# git remote set-url origin <url>

# 从另外的远程库合并更新

git merge --no-commit BrowserSync/master

加载中...
此文章数据所有权由区块链加密技术和智能合约保障仅归创作者所有。