git clone blah
git checkout master <--that's normal
git checkout test3
git log
<-- i want to check the log to understand how the history in the branch looks
if the branch is out of sync
git rebase master
.. blah blah replaying commits ahead
but maybe i want to squash extra commits
git rebase -i master
-i
is the secret of rebase that unlocks squash and fixup
with squash and fixup you can rewrite the commit history of your local repo
you can also rewrite the history of your remote
but you need to force it
after you finish making the authoritative changes
in your local
# some more commands that I remember(@fatihky)
git commit --amend
git commit --amend -s
you do: git push -f
IMPORTANT: git push -f
<-- back to the same branch you were working on
(not master)
now
clean and sync things
git rebase master
git checkout master
git merge test3
git push
all done! looks pretty! :)
that is the workflow
https://github.com/Kunena/Kunena-Forum/wiki/Create-a-new-branch-with-git-and-manage-branches
https://gist.github.com/reqshark/578d6938ebfdc0c03450