jtlindsey
jtlindsey

Reputation: 4863

Add project as a branch to an existing project in git

I have an existing project in git that other users have access to and has many branches: example_project_a.

On my machine, i have a variation of that project with lots of changes on my machine and it is not in git yet.

How can I add my current project as a branch of example_project_a so that I share my changes with the group?

This similar question pushes it to the master of the existing but i don't want to affect master.

Upvotes: 3

Views: 10554

Answers (1)

jtlindsey
jtlindsey

Reputation: 4863

Based on the comment from 0x5453 and ref worked:

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

Upvotes: 7

Related Questions