Work Github相关

文章目录

  • [1 Visul Studio使用git控制版本](#1 Visul Studio使用git控制版本)
    • [1.1 git remote -v](#1.1 git remote -v)
      • [1.1.1 myrepo 是你自己 fork 到 GitHub 上的仓库(estimate123/LXL_XV6_LAB)。](#1.1.1 myrepo 是你自己 fork 到 GitHub 上的仓库(estimate123/LXL_XV6_LAB)。)
      • [1.1.2 origin 是 MIT 课程官方源,地址是 git 协议(git://)。](#1.1.2 origin 是 MIT 课程官方源,地址是 git 协议(git://)。)
    • [1.2 git push](#1.2 git push)

1 Visul Studio使用git控制版本

1.1 git remote -v

用途:查看当前目录下对应的远程仓库的名称地址

Visual Studio当前git情况

bash 复制代码
PS D:\Study\VMShareFolder\xv6-labs-2020> git remote -v
myrepo  https://github.com/estimate123/LXL_XV6_LAB.git (fetch)
myrepo  https://github.com/estimate123/LXL_XV6_LAB.git (push)
origin  git://g.csail.mit.edu/xv6-labs-2020 (fetch)
origin  git://g.csail.mit.edu/xv6-labs-2020 (push)

这台机器里给同一个仓库登记了 两个远程(remote),一个叫 myrepo,一个叫 origin。

含义一行行看:

1.1.1 myrepo 是你自己 fork 到 GitHub 上的仓库(estimate123/LXL_XV6_LAB)。

复制代码
	地址是 HTTPS,可以读也可以写(只要你登录过 GitHub)。

1.1.2 origin 是 MIT 课程官方源,地址是 git 协议(git://)。

复制代码
	git 协议默认只读,而且 MIT 那边并没有开放写权限给全世界,所以只要执行

git push origin syscall

服务器就会返回

fatal: remote error: access denied or repository not exported: /xv6-labs-2020

------正是你刚才看到的那句。

1.2 git push

当前在branch syscall的情况下,想要push代码使用以下命令

bash 复制代码
git push myrepo syscall
相关推荐
青晚舟13 小时前
AI 时代前端还要学 Docker & K8s 吗?我用一次真实部署经历说清楚
前端·github
星浩AI13 小时前
现在最需要被 PUA 的,其实是 AI
人工智能·后端·github
AI程序员14 小时前
Pi Monorepo 学习指南
github
Renhao-Wan19 小时前
基于 GitHub Actions 构建标准化 CI/CD 流水线——从手动部署到全自动化交付
ci/cd·自动化·github
irpywp19 小时前
Skales:你的本地AI特工
github
CoderJia程序员甲20 小时前
GitHub 热榜项目 - 日榜(2026-03-19)
人工智能·ai·大模型·github·ai教程
多厘21 小时前
使用 opencode 和灵感写一个 mac App (实操版)
前端·github
几许1 天前
高并发强一致性顺序号生成系统 -- SequenceGenerator
java·github
badhope1 天前
GitHub超有用项目推荐:skill仓库--用技能树打造AI超频引擎
java·开发语言·前端·人工智能·python·重构·github