I'm working on my current master and have done quite a few changes which are as of now neither locally nor remotely committed. However, I am ready to commit them. Before doing so I would like to turn the current master without these uncommitted changes into a new branch but I am not completely sure what the right procedure for this is. My first idea was to do a clean clone in a different directory
git clone REPO and then initialize a new branch from the current master
git checkout -b OLD_MASTER and then commit. Then go back into the other clone which contains the uncommitted changes and commit them. But that seems unclean to me. What is the right way to achieve my goal?
masteralready is a branch. Also doinggit checkout -b OLD_MASTERand then committing will makeOLD_MASTERpoint to a new commit which has nothing to do with the oldmaster, so that doesn't make sense either. I'm not really sure what you're trying to achieve here; please could you clarify the use case or end goal?