Reputation: 473
I have a load of commits, on a bitbucket branch where I was experimenting on the code. I want to squash all those into just one commit, without squashing all the other commits. Does this call for a rebase.
Bit confused on what a rebase is.
Upvotes: 1
Views: 1665
Reputation: 1660
yep you will get a console to edit the commits: like this:
git rebase -i qa
then press keyboard 'i' to edit
you will see like this:
pick etc1
pick etc2
pick etc2
replace the word pick with 'f' and press esc y :wq
pick etc1 //this commit will the one commit
**f** etc2
**f** etc2
and press this command
git push origin +head
Upvotes: 1