惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Hugging Face - Blog
Hugging Face - Blog
Google DeepMind News
Google DeepMind News
云风的 BLOG
云风的 BLOG
WordPress大学
WordPress大学
Vercel News
Vercel News
Apple Machine Learning Research
Apple Machine Learning Research
T
Tailwind CSS Blog
I
InfoQ
小众软件
小众软件
Recent Announcements
Recent Announcements
博客园 - 【当耐特】
The GitHub Blog
The GitHub Blog
大猫的无限游戏
大猫的无限游戏
美团技术团队
T
The Blog of Author Tim Ferriss
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
酷 壳 – CoolShell
酷 壳 – CoolShell
MongoDB | Blog
MongoDB | Blog
V
V2EX
J
Java Code Geeks
有赞技术团队
有赞技术团队
博客园 - 聂微东
B
Blog RSS Feed
博客园 - 司徒正美

博客园 - 试试手气

Web Worker 入门 若依Ruoyi分离版替换 MyBatis-Plus 若依前端菜单管理中路由地址、组件路径、权限字符的使用 Spring Boot —— Spring Security Spring Boot —— 集成文档工具 Spring Boot —— Filter 过滤器 Spring Boot —— Cors 跨域 Spring Boot —— 集成 Druid Spring Boot —— 集成 MyBatis-Plus Spring Boot —— 集成 Springdoc Navicat 使用笔记 Datagrip连接SQLServer失败 Asp.net mvc 笔记 Asp.net Core 笔记 mybatis 笔记 SQLServer 笔记 Asp.net Core 全局异常处理 SqlSugar 实践笔记 Asp.net Core 基于Cookie的身份认证
Idea clone 项目推送到自有仓库
试试手气 · 2024-10-12 · via 博客园 - 试试手气

clone项目A后推送到自有仓库

  1. 将代码 clone 到本地 git clone https://projecta.git
  2. 手动删除 .git 目录 rm -rf .git
  3. 初始化新的仓库 git init
  4. 将本地代码添加到新的git仓库 git add .
  5. 提交本地代码 git commint -m "Initial commit of my new project"
  6. 将本地仓库与新的远程仓库关联 git remote add origin <https://newrepos.git>
  7. 推送远程 git push -u origin master

添加远程仓库并拉去合并到现有分支

  1. 添加远程仓库(可以命名为upstream) git remote add upstream <https://remoterepos.git>
  2. 拉取最新代码 git fetch upsteram
  3. 合并到自己的分支 git checkout my-branch, git merge upsteram/master
  4. 解决冲突(如果有)然后提交
  5. 推送到自有仓库 git push origin my-branch

posted @ 2024-10-12 20:47  试试手气  阅读(135)  评论()    收藏  举报