github fork项目不带tag解决

ops/2024/9/23 22:37:48/

tags" href="/GITHUB.html" title=tags" href="/GIT.html" title=git>github>tags" href="/GIT.html" title=git>github中fork别人的项目,clone下来后发现只有代码,没有tag,而我们现在想基于某个tag生成新分支,然后基于这个分支来开发。

第一步,需要把原来的tag都同步过来

# Fork源仓库
# Repo: aaa/project
# Fork: bbb/project# Track:
# 克隆你的仓库
tags" href="/GIT.html" title=git>git clone https://tags" href="/GITHUB.html" title=tags" href="/GIT.html" title=git>github>tags" href="/GIT.html" title=git>github.com/bbb/project.tags" href="/GIT.html" title=git>git # 进入你的仓库本地目录
cd project# 添加原始仓库地址
tags" href="/GIT.html" title=git>git remote add upstream https://tags" href="/GITHUB.html" title=tags" href="/GIT.html" title=git>github>tags" href="/GIT.html" title=git>github.com/bbb/project.tags" href="/GIT.html" title=git>git# Update:
# 拉取原始仓库数据
tags" href="/GIT.html" title=git>git fetch upstream --tags
# 如果你的主分支不是叫master,就把前面的master换成你的名字,比如main之类
tags" href="/GIT.html" title=git>git rebase upstream/master# 推送
tags" href="/GIT.html" title=git>git push# 推送tags
tags" href="/GIT.html" title=git>git push --tags

第二步,基于某个tag新建分支,并推送到远程仓库

# 查看所有tag
tags" href="/GIT.html" title=git>git tag# 4. 检出指定的 tag 到新分支
# 替换 'tag_name' 为你想要的 tag 名称
tags" href="/GIT.html" title=git>git checkout -b new_branch_name tag_name# 将新分支推送到远程仓库
tags" href="/GIT.html" title=git>git push -u origin new_branch_name

参考文献
https://www.cnblogs.com/bodong/p/17891893.html


http://www.ppmy.cn/ops/28667.html

相关文章

文心一言+Midjourny中文站

目录 你用过最好用的AI工具有哪些? 文心一言 Midjourney中文站 #你用过最好用的AI工具有哪些?# 你用过最好用的AI工具有哪些? 简介:目前市面上有很多新的AI工具:文心、天工、Midjourney等等,当然也有很大…

双系统下删除ubuntu

絮絮叨叨 由于我在安装Ubuntu的时候没有自定义安装位置,而是使用与window共存的方式让Ubuntu自己选择安装位置,导致卸载时我不知道去格式化哪个分区,查阅多方资料后无果,后在大佬帮助下找到解决方案 解决步骤 1、 插上Ubuntu安…

vue 预览 pdf pdf.js 的具体使用

1、下载依赖 npm install pdfjs-dist2.2.228 2、在需要用的页面引入 <script>import * as PDFJS from pdfjs-dist;export default{data(){return{}},created(){PDFJS.GlobalWorkerOptions.workerSrc require(pdfjs-dist/build/pdf.worker.min.js)},mounted(){this.h…

使用 Langchain、Langfuse、Nemo-gaurdrails、RAGAs构建 RAG 管道并进行监控和评估

原文地址:build-end-to-end-rag-pipeline-with-monitoring-and-evaluation-using-langchain-azure-ai-search 2024 年 4 月 21 日 介绍 使用现代的LLM框架,如Langchain或llamaindex,可以迅速搭建一个用于 RAG 的管道,通常只需编写大约5-6行代码。然而,若要构建一个适用于生…

postman一直转圈圈,无法启动

解决 地址栏输入%appdata%进入此目录&#xff0c;删除%appdata%目录下的postman文件可以解决问题。

237基于matlab的偏振态仿真

基于matlab的偏振态仿真&#xff0c;不同偏振态下光强计算。本仿真软件可以仿真波片对偏振光的相位调制过程。用户可以通过改变波片的类型&#xff0c;波片长轴与 X 轴的夹角&#xff0c;起偏器透光与 X 轴的夹角&#xff0c;检偏器透光轴与 X 轴的夹角等参数&#xff0c;来观察…

爬虫学习--2.urllib 库

urllib了解 urllib 库 是 Python 内置的 HTTP 请求库。urllib 模块提供的上层接口,使访问 www 和 ftp 上的数据就像访问本地文件一样。 有以下几种模块: urllib.request 请求模块 urllib.error 异常处理模块 urllib.parse url解析模块 urllib.robotparser robots.txt 解析模…

VSCODE通过SFTP链接VM进行开发

在vscode插件里面搜索sftp&#xff0c;安装。 安装之后&#xff0c;按ctrlshiftp&#xff0c;找到sftp的config 然后填写刚刚的IP&#xff0c;然后是你的用户名密码 如果是通过密钥链接的话就是这样配置 然后切换到这个sftp的tab里面 然后在你的项目右键&#xff0c;然后选择op…