Local Git Remotes
The article discusses the setup and benefits of using local git remotes. It explains how to create a bare repository on a home server and add it as a remote for pushing and pulling code. The author highlights the advantages of having a local remote for better reliability compared to offsite remotes.
- ▪A bare repository can be created by cloning an existing project directory.
- ▪Local remotes can be added using specific git commands for both local and remote machines.
- ▪The author prefers using a local remote for its reliability over offsite options.
Opening excerpt (first ~120 words) tap to expand
Local git remotes As part of working on cani I was also using a variety of git remotes. One of the remotes was hosted on a server I have at home. Here’s how I set that up. Let’s say the server has a project in a folder called cani. This folder has the code and a .git/ directory: /home/user/projects/cani We can use the above folder to clone a bare repository (can be used as a remote without causing weird conflicts): cd /home/user/bares git clone --bare /home/user/projects/cani # creates /home/user/bares/cani.git To add this bare repository as a remote to push & pull from can look like a few different ways.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at Cblgh.