git - 将项目作为分支添加到git中的现有项目

标签 git

我在 git 中有一个现有项目,其他用户可以访问并且有很多分支:example_project_a

在我的机器上,我有一个该项目的变体,在我的机器上有很多变化,但它还没有在 git 中。

如何将我当前的项目添加为 example_project_a 的一个分支,以便与小组共享我的更改?

This similar question pushes it to the master of existing 但我不想影响主人。

最佳答案

基于 0x5453 和 ref 的评论工作:

git init
git add .
git commit -m "my commit"
git remote add origin <remote repository URL>
git push origin <remote branch name>

关于git - 将项目作为分支添加到git中的现有项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57577637/

相关文章:

R: Git + Shiny 服务器自动化部署

git - 将 GIT 与 GIT GUI 结合使用 - Master 和 Branching

java - 当我切换分支时,Eclipse 没有看到从 Git 恢复的文件

git - Azure DevOps '401 - Uh-oh, you do not have access' 受邀用户

macos - 如何在终端中显示当前分支和文件夹路径?

git - 无效的路径规范魔法

Xcode merge : How to click "Left then right" button?

php - Composer 安装/更新不起作用

windows - Git Fetch 在 windows 中返回 'fatal: I don' t handle protocol https'

git difftool : how to measure progress, 那是差异化和差异化的文件数量?