Hi,
when I do a local hard reset to some previous commit and try to push to remote repo I get a "remote repo is ahead" (along those lines) error message.
Found this related thread at stackoverflow
What I currently do from command line is what's mentioned there as answer:
git fetch origin git reset --hard origin/master git clean -f
Can I also do this directly from within SourceTree ?
I see a button for fetching, is functionality for reset and clean also build in ?
Just curious, as this would make the process a little quicker than switching to command line.
Thanks.
That's an odd series of commands. You should be able to just do a
push -f
I don't think you can do it within SourceTree, though - at least, not without setting up a Custom Action, which I haven't played with much
Thanks, I'll try next time I need to do this and report back.
Talking of force-push, there actually is a "Force" tickbox in SourceTree's Push dialog, but it's always grayed out here. Any idea why ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.