0

I only see ways to copy the network folder locally and clone to a git repo.

But I specifically want to keep all the files/folders on the network directory and just have it checked into GitLab source control.

Don't see anything mentioning GitLab is incapable of this, but can't find any tutorial w/ cmd's showing exactly how to do this.

Mark McGown
  • 655
  • 7
  • 12
  • Are you looking for [documentation](https://docs.gitlab.com/ee/gitlab-basics/start-using-git.html#convert-a-local-directory-into-a-repository)? – SiKing Dec 01 '20 at 20:17
  • Seems like there are some details that would be helpful. Are you accessing the network folder via command line? What OS? – Adam John Dec 01 '20 at 20:52
  • Windows OS. I can access it any way necessary, there are just files that exist there that I want to keep source controlled through GitLab. – Mark McGown Dec 01 '20 at 22:17
  • Lots of options then.. what git client/s do you use, if any? – Adam John Dec 02 '20 at 18:48

1 Answers1

0

This should simply be a matter of using a git client you are familiar with, from a device and user that has read/write access to the directory and creating the repository.

For my projects, I typically map a drive in windows. This is out of scope and well-answered elsewhere. (hint: net use Map a network drive to be used by a service)

If you do not have git or a git client installed, try this as a starting point: https://docs.gitlab.com/ee/topics/git/how_to_install_git/#installing-git-on-windows-from-the-git-website

That article is pretty bare so, more specifically the download page referenced in that article is here: https://git-scm.com/downloads

The link helps in that it continues the process, covering how to add SSH keys... which branches based on git client choices. Also well-covered elsewhere, but the short version is: (1) create key w/pub and priv parts on local (2) upload/save pub key on Gitlab

Okay, a word or two on git clients. Command line is the most universal and translates across Win, Lin, Mac. I suggest learning the basics at minimum.

Visual Studio Code comes with some git tools. IF you have it, definitely worth a spin.

GitKraken is popular right now and has free/paid options, and TortoiseGit is fairly well established in Windows circles.

SourceTree, Sublime and other IDEs have git options too... worth knowing. (I like sublime and here again is MSVS, but popular as well are NetBeans and IntelliJ IDEA)

Git for Windows (https://gitforwindows.org/) has CLI And GUI choices and has worked well for me in the past when necessary.

Okay ... so, the answer in summary is:

  1. pick a git client
  2. make sure the user has access and r+w to the directory/network path
  3. create and push a repo per normal process

Fundamentally, it isn't different from a normal folder you have access to... except that you will lose access if you are not connected and depending on the git client choices... some will handle this better/worse than others.

hth

Adam John
  • 188
  • 1
  • 6