I'm trying to run the following command in a command prompt, with single percentage for the argument, as it should be for command prompt instructions:
for /F %remote in ('git branch -a') do (git branch --track %remote) && git fetch --all && git pull --all
But I still get the following error:
%remote was unexpected at this time.
There's a lot of issues with this "argument was unexpected at this time". I've searched and searched but almost all solutions refer to the same confusion between using % or %%. Double percentages should only be used in batch files. But I'm using the proper notation. Why doesn't it work?
Could it be because of the parenthesis? I don't know if this issue mentioned on Microsoft's website is relevant or not.