Open DayuanTan opened 2 years ago
Assuming your repository to work on is a subdirectory of your current directory and is named my-repo-folder-name
, then you could run bfg
as
bfg --delete-files "id_{dsa,rsa}" my-repo-folder-name
It might be that you just missed the double quotes in that specific case. Without them, your Shell might use brace expansion for the id_{dsa,rsa}
. The actual executed command line would become bfg --delete-files id_dsa id_rsa my-repo-folder-name
.
Normally in such a case, the error message should provide you already a hint.
$ bfg --delete-files id_dsa id_rsa my-repo-folder-name
Error: Unknown argument 'my-repo-folder-name'
bfg 1.14.1-SNAPSHOT (master-e7cdc46)
Usage: bfg [options] [<repo>]
The command instructs bfg
to delete files named id_isa
in repository id_rsa
, where my-repo-folder-name
is interpreted as an additional parameter, which bfg
does not know to handle.
I can't get this to work either.
I am working in a shell in a directory where the repo I want to work on is in the subdir "abcdef" (actually it is a submodule of an outer repo). Then I would like to remove the file index.php with
java -jar /path/to/bfg-1.14.jar --delete-files "index.php" abcdef
but all I get is usage instruction and
Aborting : abcdef is not a valid Git repository
I tried also adding .git
to the repo name without any difference.
Why do you not clone the submodule as a regular repository and do the amendment there?
Why do you not clone the submodule as a regular repository and do the amendment there?
I did that, actually by following the docs here (cloning as a bare repo) and this worked.
It might be that you just missed the double quotes in that specific case. Without them, your Shell might use brace expansion for the
id_{dsa,rsa}
. The actual executed command line would becomebfg --delete-files id_dsa id_rsa my-repo-folder-name
.
thanks for the hint here, this makes it clear that the documentation is incorrect:
It says "Usage: bfg [options] []", like "$ bfg --delete-files id_{dsa,rsa} my-repo.git".
But how to present my repo locally?
I tried
They all don't work.
Thank you very much! I appreciate it very much!