Notice: This is not a duplicate of this, so also no duplicate of this. Also not duplicate of this
Abstract:
I'd like to edit two files within the same branch(?) (both open in same IDE; both compiling to the same executable), while being able to commit/push/pull them on individual branches.
Concrete Example
Scenario steps:
- I'm creating a
Computer
component in filecomputer.file
. I manage it in branchcomponent/computer
. - I figure out, I will need to implement a
Mouse
component in filemouse.file
. I also manage it in branchcomponent/computer
- I will be working on
Computer
andMouse
simultaneously (adjustingMouse
to whatComputer
needs). - I'm doing regular local commits to save my progress.
- While I'm still working on both components, other team members like to also use the
Mouse
component in it's current version. - The
Mouse
component should best be shared in the main branch (develop
branch). But as theComputer component
is long before finished,develop
branch should not know about it.
Problem:
Computer.file
and Mouse.file
are worked on within the same branch (component/computer
), so merging that with develop
, will also add Computer.file
into develop
(which is unwanted)
What I want:
I'd like to be able push/merge only Mouse.file
into develop (regularly).
My idea of the solution is to have Computer.file
on branch component/computer
and Mouse.file
on branch component/mouse
, while being able to edit both branches in one IDE and branch and being able to commit/push/merge both branches independently.