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

推荐订阅源

F
Fortinet All Blogs
aimingoo的专栏
aimingoo的专栏
V
Visual Studio Blog
罗磊的独立博客
爱范儿
爱范儿
J
Java Code Geeks
博客园 - 司徒正美
N
Netflix TechBlog - Medium
Microsoft Security Blog
Microsoft Security Blog
美团技术团队
小众软件
小众软件
Google DeepMind News
Google DeepMind News
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V
V2EX
博客园 - 聂微东
云风的 BLOG
云风的 BLOG
WordPress大学
WordPress大学
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Jina AI
Jina AI
Y
Y Combinator Blog
博客园 - 叶小钗
人人都是产品经理
人人都是产品经理
Martin Fowler
Martin Fowler
Vercel News
Vercel News

博客园 - 试试手气

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)  评论()    收藏  举报