记录一个用了很久的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两个代码仓库了

相关推荐
CoderJia程序员甲2 分钟前
GitHub 热榜项目 - 日榜(2026-02-02)
人工智能·ai·大模型·github·ai教程
huangjiazhi_22 分钟前
git clone next InitializeSecurityContext failed错误
git
_oP_i2 小时前
git gui设置github sshkey
git·github
mathematican2 小时前
Git本地修改导致pull失败的解决方法
github
ergevv2 小时前
Git 子模块(Submodule)操作指南
git·子模块·submodule
MicrosoftReactor3 小时前
技术速递|GitHub Copilot SDK 与混合 AI 实践:README 到 PPT 的自动化转换流程
人工智能·github·copilot
阿拉伯柠檬3 小时前
Git原理与使用(一)
大数据·linux·git·elasticsearch·面试
阿里嘎多学长4 小时前
2026-02-02 GitHub 热点项目精选
开发语言·程序员·github·代码托管
chao_7894 小时前
双设备全栈开发最佳实践[mac系统]
git·python·macos·docker·vue·全栈
江湖有缘4 小时前
华为云之基于鲲鹏服务器部署打砖块小游戏全流程
服务器·华为云·github