I would like to create a pull request for a branch (uglyCommitsBranch
) that I have, but it has lots of commit messages I would like to squeeze into one commit.
To do so, I think the following steps need to happen:
git checkout master
git pull
git branch newFeature
git push origin newFeature
git checkout newFeature
Now I need to take stuff from uglyCommitsBranch
and put them all into newFeature
, then push to origin for code review.
What are the next commands I need to run?
I am not sure how to run rebase commands and am afraid of breaking master
.
If I am currently on newFeature
branch (clean branch off master
), what are the next commands to get this done?