记录一个用了很久的git提交到github和gitee比较方便的方法

在当前git init后,在隐藏的git文件夹中找到config文件

复制代码
[user]
	name = thels
[remote "github"]
	url = your github repository url
	fetch = +refs/heads/*:refs/remotes/origin/*
[remote "gitee"]
	url = your gitee repository url
	fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
	remote = origin
	merge = refs/heads/master

键入以上内容

之后git add、gitcommit后,就可以通过git push gitee master和git push github master两个语句分别快速推送到github和gitee两个代码仓库了

相关推荐
修己xj19 小时前
解决Github QQ邮箱注册难题:绕过“Unable to verify your captcha response”错误
github
cos20 小时前
Fork 主题如何更新?基于 Ink 构建主题更新 CLI 工具
前端·javascript·git
Java后端的Ai之路20 小时前
【远程仓库】- AutoDL算力平台中Gitee 项目克隆指导
gitee·autodl
OpenMiniServer21 小时前
当 AI 成为 Git 里的一个“人”
人工智能·git
AI首席情报员_阿布1 天前
2026 GitHub 最火的 10 个 AI Agent 框架:普通开发者的选型指南
github
Carry3451 天前
不清楚的 .gitignore
前端·git
阿里嘎多学长1 天前
2026-01-11 GitHub 热点项目精选
开发语言·程序员·github·代码托管
三两肉1 天前
HTTPS ECDHE 握手全解析
网络协议·https·github·rsa·echde
啊湘1 天前
vscode 使用 github (适用CURSOR等使用)
ide·vscode·github·cursor·mcp
l1t1 天前
利用DeepSeek辅助拉取GitHub存储库目录跳过特定文件方法
人工智能·github·deepseek