2

I'm simply trying to force push on a subtree, using the following command:

git push origin git subtree split --prefix dist gh-pages:gh-pages --force

and I get the following error:

error: unknown option `force'

it's strange because I followed a web page and answers here in stack overflow that are using the --f / --force parameter.

Any idea what's wrong and how I can overwrite everything and push my code to the gh-pages subtree?

TheUnreal
  • 23,434
  • 46
  • 157
  • 277

1 Answers1

0

Add backticks (`) which invokes a bash "command substitution".

git push origin `git subtree split --prefix dist gh-pages`:gh-pages --force

Reference: https://www.gnu.org/software/bash/manual/html_node/Command-Substitution.html