Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to make git clone recursive by default? [duplicate]

Tags:

git

Is it possible to make git clone do git clone --recursive by default?

like image 543
Sahand Avatar asked May 26 '14 00:05

Sahand


People also ask

Is git clone recursive?

You can use the --recursive flag when cloning a repository. This parameter forces git to clone all defined submodules in the repository.

Does git clone Get all branches?

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.

Does git clone clone history?

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.

What happens when you clone a git 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.


1 Answers

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
like image 133
linquize Avatar answered Oct 01 '22 01:10

linquize