尧图网络科技YAOTU DIGITAL 获取报价
获取报价
首页 / 资讯中心 / 文章详情

如何用git把本地的文件上传到码云中仓库

发布时间:2026/9/24 2:25:10

资讯中心
01
ARTICLE

如何用git把本地的文件上传到码云中仓库

如何用git把本地的文件上传到码云中仓库
Git 本地仓库与 Gitee 远程仓库冲突解决完整流程一、配置用户信息全局只需执行一次以下命令用于配置 Git 全局用户信息新项目无需重复设置git config --global user.name 你的用户名 git config --global user.email 你的邮箱二、绑定远程仓库第一次关联远程只执行一次添加远程 origin如果提示 origin already exists则改用修改远程地址git remote add origin https://gitee.com/CMJGZ/vue3---fabric.js.git git remote set-url origin https://gitee.com/CMJGZ/vue3---fabric.js.git三、提交本地文件每次改完代码都要执行将所有修改加入暂存区并提交到本地仓库git add . git commit -m 初始化vue3 fabric绘图项目警告 LF will be replaced by CRLF 可直接忽略这是 Windows 正常提示不影响上传。四、推送遇到冲突报错non-fast-forward拉取远程仓库代码合并两个互不相关的提交历史git pull origin master --allow-unrelated-histories如果弹出 vim 编辑器按 Esc 键输入 :wq回车保存退出合并。五、合并完成推送到 Gitee 远程仓库git push origin master配套辅助命令以下命令用于日常查看仓库状态git status git remote -v git log git branch最简一键流程每次改完代码直接用git add . git commit -m 填写本次修改描述 git push origin master只有再次碰到 rejected non-fast-forward 冲突报错才需要执行git pull origin master --allow-unrelated-histories git push origin master补充强制推送备用谨慎使用git push -f origin master作用直接用本地代码覆盖远程仓库多人协作不要随便用新项目测试可用。完整整块复制版git config --global user.name 你的用户名 git config --global user.email 你的邮箱 git remote add origin https://gitee.com/你的用户名/你的仓库.git git remote set-url origin https://gitee.com/你的用户名/你的仓库.git git add . git commit -m 初始化vue3 fabric绘图项目 git push origin master git pull origin master --allow-unrelated-histories git push origin master
02
RELATED NEWS

相关资讯

更多网站建设与数字化升级内容

03
WHY YAOTU

想打造同款高转化官网?

懂行业、懂生意,从建站到增长一站式陪跑

场景化定制

不做模板站,围绕你的业务场景量身设计,小众不撞款。

营销型架构

以转化目标组织内容与路径,让官网真正带来询盘。

全周期服务

设计、开发、运营、运维一体,上线只是开始。

免费获取你的建站方案

留下需求,专属顾问 24 小时内为你输出方案建议。