Do this in your own branches and not on master
~/Documents/Invoca/web on ⭠ 81/eb/STORY-2324_add_failover_node_ui ⌚ 17:28:16
$ git rebase -i ac28fc8~1
# will open up your configd editor of choice and you will be presented with a menu.
I typically use edit
because I like to stop at every individual commit and ensure the changes are correct by doing a git commit --ammend
and then continuing with the rebase with git rebase --continue
.
git commit --ammend
- Update commit message
git rebase --continue
- Repeat until rebase is completed
~/Documents/Invoca/web on ⭠ 8bddf1d ⌚ 17:37:57
$ git rebase --continue 2.1.2
Successfully rebased and updated refs/heads/81/eb/STORY-2324_add_failover_node_ui.
We are done with the rebase but git push
won't work
~/Documents/Invoca/web on ⭠ 81/eb/STORY-2324_add_failover_node_ui ⌚ 17:38:01
$ git push 2.1.2
To [email protected]:Invoca/web.git
! [rejected] 81/eb/STORY-2324_add_failover_node_ui -> 81/eb/STORY-2324_add_failover_node_ui (non-fast-forward)
error: failed to push some refs to '[email protected]:Invoca/web.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Instead we have to use git push origin branch_name -f
and the repo should get updated immediately