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

推荐订阅源

Y
Y Combinator Blog
GbyAI
GbyAI
U
Unit 42
WordPress大学
WordPress大学
Last Week in AI
Last Week in AI
P
Proofpoint News Feed
D
DataBreaches.Net
N
Netflix TechBlog - Medium
H
Hackread – Cybersecurity News, Data Breaches, AI and More
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
C
Check Point Blog
Martin Fowler
Martin Fowler
月光博客
月光博客
MongoDB | Blog
MongoDB | Blog
MyScale Blog
MyScale Blog
The Cloudflare Blog
Apple Machine Learning Research
Apple Machine Learning Research
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
M
MIT News - Artificial intelligence
云风的 BLOG
云风的 BLOG
罗磊的独立博客
B
Blog RSS Feed
J
Java Code Geeks
The GitHub Blog
The GitHub Blog

博客园 - 试试手气

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