Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add project as a branch to an existing project in git

Tags:

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.

like image 365
jtlindsey Avatar asked Dec 22 '25 04:12

jtlindsey


1 Answers

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>
like image 129
jtlindsey Avatar answered Dec 23 '25 20:12

jtlindsey



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!