Reputation: 310
Our workflow is to create branches via JIRA. I knew a branch (named A) would soon be merged w/ master and that is the work I needed to build on. So what I did was branch off A locally, creating B.
After A was merged w/ master, I created a new branch C with the appropriate branch name.
On branch B there is a single commit, and I would like that work to be as if it were committed on branch C. How do I do this so that it looks as though I never created B off of A?
Update: No work has been done on C at this point; it has just been created.
Upvotes: 0
Views: 3090
Reputation: 265281
There are many options:
git branch -m C B
git checkout -b C B
(eventually: git branch -d B
).git cherry-pick B
(while on branch C)Upvotes: 2