26

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

2
  • 1
    @TylerH: Almost, but the answer here is worth saving, and it wouldn't quite fit there. Commented Dec 7, 2017 at 15:29
  • @einpoklum fair point, but questions closed as duplicates are not deleted by the Roomba, as they act as useful signposts. Commented Dec 7, 2017 at 15:30

1 Answer 1

19

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
Sign up to request clarification or add additional context in comments.

2 Comments

Interesting. I had alias glone="git clone --recursive" in my bashrc file but I think I prefer this. I didn't know you could alias git commands. Thank you.
@Sahand I believe that's not possible, actually: stackoverflow.com/questions/5916565/#comment6812824_5916565

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.