Re:Jenkin developers accidentally do "git push --force" to o...
by phaemon on Tuesday November 12, 2013 @04:29AM
(#6716722)
Why would you do this, rather than pull into a different branch name, fix it there, and then merge it in? Is there an advantage to doing it by altering your own repo?
Re:Jenkin developers accidentally do "git push --force" to o...
by nickstinemates on Tuesday November 12, 2013 @05:37AM
(#6716973)
I am talking about editing history and squashing commits. For cleaner merges.
Re:Jenkin developers accidentally do "git push --force" to o...
by lmm on Tuesday November 12, 2013 @10:09AM
(#6718206)
Yes, but you can pull into a new local branch, do the history edit there, and then push that new branch, can't you? Not that I'm sure it would be worth it.
Re:Jenkin developers accidentally do "git push --force" to o...
by gcb1 on Tuesday November 12, 2013 @06:07AM
(#6717062)
But you should do that locally and then push without force.
Re:Jenkin developers accidentally do "git push --force" to o...
by swift on Tuesday November 12, 2013 @11:28AM
(#6718706)
If you're working in an organization that employs pre-merge code review, you may have to modify your topic branch several times before it's ready to be merged into the main development branch. Creating a new branch every time so that you can push without force seems pointless in this case and increases confusion for everyone involved in the process.
Rebase and squash. Fix commit messages. Force push to PR-branch tidy.