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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.