A remote repository is usually a
bare git folder. It don’t necessary to be in a remote server. Actually we can make it somewhere in 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. For example, I chose to make the remote folder in the Dropbox folder.
- Make sure it is an empty folder. Then we run the following
git initcommand with the
git init --bare
We just created a remote repository. If you list the files and directory inside the remote repository, it looks similar to what you list I the
.git folder inside our previous got controlled project.
Note on using Dropbox folder as remote repository
I tried. It works most of the time, until it created inconsistent when 2 or more team members are pushing changes to the remote at the same time.