Reputation: 5368
I have a scenario wherin I want to initialize a git repo remotely on type of the command git init
.
Now when I do a git init
, it creates a repository in the current directory.
But what I want to do is, I want to create a create a git repo remotely.
Something like git init
I dont want to a git init and then do a git push.
Is it possible?
Upvotes: 1
Views: 70
Reputation: 5542
Log in to the remote server, create a new directory and initialize it:
mkdir new_repo.git
cd new_repo.git
git init --bare
Make sure you configure permissions correctly if needed, then just set your local working repo's remote to the server address.
Take a look at this for the difference between git init
and git init --bare
.
Upvotes: 0