Create a Remote Repository

Learn to create remote Git repositories.

A remote repository is a bare Git folder. It isn’t necessarily on a remote server. It can be somewhere in the same system.

Remote repository on the same system

In this example, we create a remote folder in the same system. Choose a place that’s not part of the current project folder.

$ mkdir -p New_Folder
$ cd New_Folder

Now, we’ll make a Git repository and make an initial commit in it:

$ mkdir git_origin
$ cd git_origin
$ git init
$ echo 'first commit' > "file1"
$ git add file1
$ git commit -am file1

We’ll see this remote repository in action in the following few lessons.

Get hands-on with 1200+ tech skills courses.