I am pretty new to git, so I apologize if this is a simple solution.
I need to rebase the entire master branch of a repo to a feature branch. The repo was made, then someone used master as the first feature branch. So, what I have now is:
A -- B -- C -- D (branch: master)
and what I would like to do is
A--B--C--D (branch: new-feature)
/
Z (branch: master)
where Z represents a commit containing just a .gitignore file (or some other "repo-initializing commit" ... I'd even take a blank commit containing no files, but I don't think git likes/allows that).
I understand how to rebase commits within a branch, so I understand how to do this:
C--D (branch: new-feature)
/
A--B (branch: master)
but I have not been able to figure out how to rebase all of master onto a feature branch. I believe the crux of the issue I keep facing is that I don't have any commit to point master at, since there is no Z commit (commit A has partial feature implementation, so I can't use A in place of Z).
Thank you in advance!