Page 1 of 1

Can I setup Git for a local repo only - no remote.

Posted: Mon 08 Nov 2021 01:48
by gpl190wsd
Hi. I'm a solo developer so I don't really need remote repo. I use --separate-git-dir= on 'git init' to put the local repo content on a local NAS, so remote repo is not really required.

I don't want to clone etc just to setup the repo. I'm getting the "There is no tracking information for the local branch. Please specify which branch you want to merge with", but I don't need to merge anything.

Can I configure Source Control to use only a local git repo?

Thanks
GL.

Re: Can I setup Git for a local repo only - no remote.

Posted: Mon 08 Nov 2021 08:06
by alexa
dbForge does not work with a local repository. The repository needs to have remote adjusted and a local branch with the tracking being setup for remote branch.

If you want to work just locally, this can be performed as follows:
- Create a local main repository using git init --bare
- Navigate to a different folder and clone with git clone <pathToMainRepo>
- Execute (in the clone folder):
git commit --allow-empty -m initial
git push

and link to that folder.

Please also see:
https://blog.devart.com/how-to-set-up-version-control-of-your-sql-server-database-from-scratch.html
https://blog.devart.com/database-version-control-using-source-control-for-sql-server.html