I have to disagree with artfuldodger's writeup.
I've come to view this phrase in terms of merely a statement of fact.
In other words, whether or not one thinks they are trying to perform a task or seriously making an attempt, there are essentially two possible results - success or failure. Do or do not. There was no try, after all would be said and done.
My personal response to this observation - and I think Lucas and Yoda would approve - is to clear my mind and simply act without thought. Amateur Zen in action. Ideally, this frees me from distractions like my internal monologue.
Where I disagree with artfuldodger is that doing this doesn't eliminate chances of failure; what it does do is remove irrelevant elements that could cause failure
IMHO, anyway.