Open rtsao opened 8 years ago
Since dir is a required option, I don't see the harm in making it the first argument (especially given the command name push-dir. The extra dir is redundant and I think actually harms readability and clarity)
dir
push-dir
push-dir --dir=build --branch=gh-pages
push-dir build --branch=gh-pages
Alternatively, I like this syntax:
push-dir build:gh-pages
Rationale:
:
git push <remote_name> <local_branch_name>:<remote_branch_name>
The whole point of this module is to basically push the contents of a folder as if it were a branch, so I think it makes sense.
We could even make it symmetric so we have:
push-dir {optional_remote_name} <local_dir_name>:<remote_branch_name> {advanced_options}
Unfortunately, directory names can contain colons, so maybe this is alternative is better:
push-dir build gh-pages {advanced_options}
Since
dir
is a required option, I don't see the harm in making it the first argument (especially given the command namepush-dir
. The extradir
is redundant and I think actually harms readability and clarity)Alternatively, I like this syntax:
Rationale:
:
git push <remote_name> <local_branch_name>:<remote_branch_name>
syntaxThe whole point of this module is to basically push the contents of a folder as if it were a branch, so I think it makes sense.
We could even make it symmetric so we have:
Unfortunately, directory names can contain colons, so maybe this is alternative is better: