Need some understanding help

Hello

I’m a single developer and I want to use version control for my Visual Studio projects. My idea is to have a folder on my NAS which shall contain the file versions that I checked in. If I understand it correctly this should be my repository then. correct? So I thought I have my drive X: to my NAS, create a folder there for the repo. Something I managed. Was this coccrect?

Then I told my Visual Studio that my local git repo is on that drive X with the path

2 questions now:

  1. At first I should do a inital check in somehow. How can I do that?
  2. When I want to continue to work, I need to checkout somehow to my local drive, but how?

Or did I understand it wrong and my remote repro is the one on the NAS and my working copy is what is meant with local repo?

I hope it is understandable what I want to do. On Drive X: shall be my old Versions and Drive O: is my current working version. When I change something on O: I want to be able to check it in to X:

The remote repo is the one that is remote, and NAS is remote. If this is what you actually want to do (ie not use a centralised point like GitHib/GitLab/BitBucket as the remote). You have this backwards: your local repo is the one that is local,not the one that is remote, that’s the remote repo.

In git, checkout is for switching between branches of your repo. This is important if you are working on an aspect of your code that you think might break or change some other aspect, or if you are working on one part while someone else is working on another part.

Ok so when I understand this correctly, the remote Repo is on my NAS and contains all old version. the local repo is my working copy? and when ever I change something I can commit it from the working directory to the remote repo?

How can I connect my local and remote repo in the visual studio?

So:

  • a local repository means the repository is just available to you.
  • a remote repository means it is available to other people (in this case, it may well still only be available to you, but that’s by the by). It is expected that the remote is on a different computer entirely, so the NAS fulfils this.

I think this Stack Overflow answer exactly fits your situation:

And either do that, or go other way and create and empty repo in the NAS, then clone to local and set the NAS location as the remote - either way is fine.

Also note that you can set multiple remotes, so if you also wanted to push to GitHub or similar, you can easily do both by just adding a remote there