Git: created new branch from a wrong branch

Note: Be sure to have a clean workspace before you begin. Read all messages git shows you. If in doubt, read more about the topic before starting.

You could rebase your feature over to the main base:

git checkout new-feature2  
git rebase --onto develop new-feature new-feature2
# rebase the stuff from new-feature to new-feature2 onto develop branch

or do it ‘manually’ by using cherry pick

git checkout develop
git log --oneline new-feature..new-feature2 
# for every commit call:
git cherry-pick <commit-id> # note, newer versions of cherry-pick allow multiple commits at once

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)