Closed codams closed 2 years ago
As a workaround, you can manually create your $HOME/Documents
, then cd
into it and run git clone git@github.com:scottashipp/noted.git
Not sure how it is on mac but the according to git documentation the correct syntax should be the one below. I couldn't find any reference for parameter -C
.
git clone <git_repo_url> <your_custom_directory_name>
Thank you for your answer, yes it's what I did and it works 🙂
I couldn't find ref either for the -C option but it is in the readme :
Perhaps create a fork of the repo, fix the readme with the proper syntax and create a PR?
@SitramSoft @codams The -C
flag is documented in the git man page here. I think it'd be fine to switch over to git clone git@github.com:scottashipp/noted.git $HOME/Documents
since that is simpler, and should work just as well for the particular use case in the README.
You are right, it is a valid option.
Done 😀
Just a tidbit: The -C
option and the regular git <repo_path> <clone_output_dir>
, while seem to do the same thing, they actually aren't:
-C
Run as if git was started in instead of the current working directory. When multiple -C options are given, each subsequent non-absolute -C is interpreted relative to the preceding -C . If is present but empty, e.g. -C "", then the current working directory is left unchanged. This option affects options that expect path name like --git-dir and --work-tree in that their interpretations of the path names would be made relative to the working directory caused by the -C option. For example the following invocations are equivalent:
git --git-dir=a.git --work-tree=b -C c status git --git-dir=c/a.git --work-tree=c/b status
Good day1
Hi, I had to
git -C $HOME/Documents clone git@github.com:scottashipp/noted.git
instead ofgit clone git@github.com:scottashipp/noted.git -C $HOME/Documents
.I'm on mac w/ iterm2 but I don't have another env to test.
Have a good dayyy