I develop websites on my laptop. Every so often I commit and push to the
remote test server to see how things run there, merging to its local
"nowork" branch. Inevitably there are one or two very minor wrinkles. I fix
these on the laptop and then push again to the test server.

When everything is OK, I like to rebase/squash the minor corrections into
the substantive commit, but need to bodge the test server to match.

I reset --hard on the test server "nowork" branch to remove the now-rebased
commits, but I cannot then push the rebased code to the test server - it
won't do fast forward because the remote branch has the original individual
commits, even though I've reset the "nowork" branch. If I use
push -f test mybranch:refs/remotes/dev/mybranch (ie with the -f option),
will that force the remote branch to match the rebased code, and I can then
merge it into "nowork"? I am aware this needs to be done with care, but it
fits very nicely into the workflow I've evolved. The "nowork" branch is
never pulled.

Thanks

Roddie Grant


-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.

Reply via email to