
#Git add remote to existing repo update#
Now you can go explore and play with your newly created local git remote thingy (I’ll update name when I find out what it is technically called). (Hello Visual Studio File Tab Channel my old friend. We can old school open that readme via File – Open – File and selecting the readme over at C:\Users\saraf\Source\Repos\shared (or wherever your default repo location is at.)Īnd volia we see the readme.txt file open in Visual Studio showing our “hello world” contents. Note Visual Studio is just going to look at you because there’s no solution file to open. Now I paste in the location to my shared.git remote.Īnd now hitting clone we’ll see an info message at the top of Team Explorer indicating that the repo was cloned successfully.ĭouble-click to switch to the newly cloned shared.git repository.

However, we can note that the objects folder has had its timestamp updated.Īll that setup! Now, let’s get back to Ed’s example… Remember we can’t do a `git ls-files` here in the shared.git folder because it is a bare repo and has no working directory. Note I’m not passing in a because I’m using Git Shell, and that’s been taken care of for me. The command is `git push server-name branch-name`, so in my case, I’ll run Now it’s time to pretend that your shared.git repo is like all the other git repos you’ve ever interacted with that is hosted on a server. I’m going to head back over to my \Source\Repos directory and create a new local git repository using the commandĪnd I’ll create a README.md file with some content and add/commit it to the repo, as you’ve done a 100 times by now. Create a local git repository to contain your actual files, like you normally would But clearly it has all the underlying plumbing when you do a `ls –la` on the folder’s contents.ģ. This command creates a bare repo, which apparently is a repo without a working directory, meaning you can’t do something like `ls` to see the contents of the git repo. You can created it by creating a new folder somewhere but calling it `shared.git` as the folder name, e.g.Ĭd inside the shared.git folder and run the command This `shared.git` thingy is actually a folder. bare repo? Help me out in the comments if you know.) This got me thinking… what is `shared.git` (is it a file, folder, etc?) and how do you create or get one locally.Īfter a bunch of SO’ing and reading several answers, I’ve learned that you can create your own local remote repo (I seriously have no idea what this type of repo is called. He shows how he could clone from F:\shared.git, where the F: drive is where he mounted a UNC share.
#Git add remote to existing repo series#
In fact, stop reading this series and go watch Ed’s course now!Įd mentions that you are not required to clone from a Git server.

It’s one of the several training courses I’ve taken to put together this series. I highly recommend Ed Thomson’s Git for Visual Studio O’Reilly course.
