merlin2011
merlin2011

Reputation: 75555

Is it possible to create a new local git repository without cloning (and therefore without push and pull?

I have looked at this this link and it suggests a way to create a local git repository and then clone it and use it.

Out of curiosity, is it possible to skip the cloning and somehow init and use a local git repository directly? That is, have a situation where you would do git commit to commit changes, but never need to invoke git push because there IS no backing "remote" repository.

Naturally, this would be for single-person source control only, rather than collaborations.

Upvotes: 0

Views: 66

Answers (1)

chepner
chepner

Reputation: 531075

Just run

git init

in a directory you want to use as a repository.

Upvotes: 6

Related Questions