Is it possible to make git clone
do git clone --recursive
by default?
You can use the --recursive flag when cloning a repository. This parameter forces git to clone all defined submodules in the repository.
The idea is to use the git-clone to clone the repository. This will automatically fetch all the branches and tags in the cloned repository. To check out the specific branch, you can use the git-checkout command to create a local tracking branch.
git clone --bare This means that a repository will be set up with the history of the project that can be pushed and pulled from, but cannot be edited directly. In addition, no remote branches for the repo will be configured with the -bare repository.
Git clone is used to copy an existing Git repository into a new local directory. The Git clone command will create a new local directory for the repository, copy all the contents of the specified repository, create the remote tracked branches, and checkout an initial branch locally.
No, it is not possible, see:
Is it possible to override git command by git alias?
However, you can define a similar instead:
git config --global alias.cloner "clone --recursive"
then
git cloner http://localhost/yyy.git
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With