![]() (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. 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. Click on Change Folder and locate your existing project folder where you have moved the files mentoned earlier.Ĭlone in SourceTree option is not available right after you create new repository so you first have to click on Create Readme File for that option to become available.I highly recommend Ed Thomson’s Git for Visual Studio O’Reilly course. ![]() Now you will see Repository Missing popup.On the left side you will have your repository but with red message: Repository Moved or Deleted.Return to SourceTree and it will say "Error encountered.", just click OK.Paste it in the location where is your existing project.hg and README (or anything else you find in that folder) ![]() Locate in windows explorer your new repository folder.Let the program put your new repo where it wants, in my case SourceTree created a new folder in My Documents.Create your new repository on Bitbucket.TLDR: Create repo, move files to existing projects folder, SourceTree will ask you where his files are, locate the files. I have a very simple solution for this problem. ![]()
0 Comments
Leave a Reply. |