[✔️]git使用遇到的问题汇总

简介: [✔️]git使用遇到的问题汇总

[✔️]git使用遇到的问题汇总


git filter-branch --force --index-filter "git rm -rf --cached --ignore-unmatch 文件路径" --prune-empty --tag-name-filter cat -- --all


替换上边的文件路径,注意分号,git会依次从所有commit中删除这个提交历史,完成之后,正常push就行了


vscode中gith关联远程分支


image.png


有时想基于remote base branch创建一个local new branch,并且希望remote自动同步新建一个remote new branch,在vscode中新建的分支会自动和remote base branch关联,预期是希望和remote new branch关联,vscode中并没有提供类似这样的操作,这时需要用到以下的git命令:


git branch -u remote/branch
git branch --set-upstream-to remote/branch


取消和远程分支关联


git branch --unset-upstream


  • 小tips 11:59:26.166: [111] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false checkout -b 3.2 ffmpeg/release/3.2^0 -- Switched to a new branch '3.2'


git action: github upload to release failed


  - name: Upload to release
    uses: xresloader/upload-to-github-release@v1
    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    with:
      file: "src/libluajit.a"
      tag: false
      draft: false 


action里面上传文件时提示失败


File found to upload: /home/runner/work/luajit/luajit/src/libluajit.a
Try to get release by tag v2.1-86bd17b2 from tidys/luajit
Try to get release by tag v2.1-86bd17b2 from tidys/luajit : Not Found
Try to get draft release v2.1-86bd17b2 from tidys/luajit
Try to create release v2.1-86bd17b2 for tidys/luajit
Try to create release v2.1-86bd17b2 for tidys/luajit failed: Resource not accessible by integration
HttpError: Resource not accessible by integration
    at /home/runner/work/_actions/xresloader/upload-to-github-release/v1/lib/index.js:5167:21
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async run (/home/runner/work/_actions/xresloader/upload-to-github-release/v1/lib/index.js:20945:13)
Error: Try to create release v2.1-86bd17b2 for tidys/luajit failed: Resource not accessible by integration
HttpError: Resource not accessible by integration
    at /home/runner/work/_actions/xresloader/upload-to-github-release/v1/lib/index.js:5167:21
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async run (/home/runner/work/_actions/xresloader/upload-to-github-release/v1/lib/index.js:20945:13)
Start uploading asset: /home/runner/work/luajit/luajit/src/libluajit.a(size: 672610) ...
Upload asset: libluajit.a success


解决办法


  • 方法1:在仓库的Settings/Actions/General设置读写权限


image.png


  • 方法2:在action里面配置权限: permissions: write-all
目录
相关文章
|
Java 应用服务中间件 Nacos
Spring Cloud 常用各个组件详解及实现原理(附加源码+实现逻辑图)
Spring Cloud 常用各个组件详解及实现原理(附加源码+实现逻辑图)
1020 0
|
XML Java 开发者
springboot自动装配的基本原理
Spring Boot自动装配基于“约定大于配置”理念,通过@SpringBootApplication、@EnableAutoConfiguration与spring.factories机制,结合条件注解实现智能Bean加载。它根据依赖自动配置组件,大幅简化开发。其核心是AutoConfigurationImportSelector筛选符合条件的配置类,实现按需装配。开发者可专注业务,享受“开箱即用”的便捷体验。(238字)
|
canal 缓存 NoSQL
Redis缓存与数据库如何保证一致性?同步删除+延时双删+异步监听+多重保障方案
根据对一致性的要求程度,提出多种解决方案:同步删除、同步删除+可靠消息、延时双删、异步监听+可靠消息、多重保障方案
Redis缓存与数据库如何保证一致性?同步删除+延时双删+异步监听+多重保障方案
|
Ubuntu Shell C++
在Ubuntu18.04上安装ros2的环境,ros2的常用命令:播放包、录制包等
在Ubuntu18.04上安装ros2的环境,ros2的常用命令:播放包、录制包等
2182 1
|
Docker 容器
Docker Desktop镜像迁移到其他磁盘
Docker Desktop镜像迁移到其他磁盘
847 0
|
机器学习/深度学习 数据可视化 网络协议
ubuntu16.04下ROS操作系统学习笔记(二)命令工具了解和仿真小海龟
ubuntu16.04下ROS操作系统学习笔记(二)命令工具了解和仿真小海龟
1163 0
沙箱使用注意事项
1、目前沙箱支付宝钱包只支持Android系统。  下载地址:https://sandbox.alipaydev.com/user/downloadApp.htm  2、沙箱钱包无法用于线上收款。  请使用时注意沙箱和正式线上的区别。
1647 0
|
1天前
|
监控 网络协议 算法
2026年起SSL证书有效期逐年缩短:企业如何避免“续期风暴”!
SSL证书有效期将从2026年起分三阶段逐步缩短至47天,人工续期难以为继。阿里云“WoSign SSL证书+自动化服务”,支持域名监控、自动托管、云产品/服务器一键部署及智能提醒,助力企业高效应对高频续期挑战。
8045 0