I have an unusual git question, hoping someone else has done this before and can provide insight...
I'm working on workflow to add files to an existing git project. Through a series of automated steps, I was hoping to create a branch that is completely empty, introduce new files, commit those files to the remote branch, then have the user manually merge the new files so that the new changes don't automatically overwrite/damage anything in the existing project.
I've tried git checkout --orphan
, which doesn't do what I want b/c it just creates a "new" history that, when merged, replaces the existing branch's contents. You can't merge these the way you would normally merge changes.
I've also tried doing a normal git checkout -b emptybranch
, then manually deleting all of the files and introducing the new files. The problem with this case is that I don't want existing files to be deleted on merge - I only want new files to be included into the new project, or conflicts to be made visible for the project owner to merge themselves.
What I want is the addition/merge of new files without deleting anything existing from the existing branch (and the new branch only contains the new files, nothing else from the existing branch). Any assistance would be greatly appreciated.