I have a long running local feature branch which I was periodically squashing and rebasing with master to keep it up to date locally.
When completed I want my feature in a single squashed commit on top of master.
However, I was worried about losing my work in case of hardware issues, so I pushed this to a new feature branch on github as a precaution. Since doing this I'm not really sure how to keep my feature branch up to date since it has already been pushed (I'd rather not merge changes from master creating merge commits).
I am the only developer using this feature branch. So I'm not worried about rewriting history on an already pushed branch. Is it fine to push additional commits to my remote feature branch, squash that branch when I'm completed with the feature, and then rebase this onto master? Or will git throw some error about the branches diverging since the branch was already public?
Alternatively, I was thinking that when my work was complete, I could simply untrack the remote feature branch (so my local branch no longer has an association to the remote branch), squash the commits in the local feature branch, and then rebase my feature branch locally on top of master.