Say you're checked out on a feature branch, feature/foo
. You realize that the feature you're implementing has a dependency that isn't really in the scope of what the feature does; it just needs that. It would be useful for that to exist on develop
, too. From your feature branch feature/foo
, run the command
git dependency create bar
This will find the common ancestor between, by default, develop
and feature/foo
. From there it will create a new branch called dependency/bar
, and switch to it. There you can implement your dependency and make some commits. When you're done, switch back to your feature branch, then run
git dependency merge bar
This will merge dependency/bar
into, by default, develop
and feature/foo
. It will leave you checked out on feature/foo
after it's done.