1

I want to add source control to my company's computers but I am new to this technology and don't understand how to use it offline.

My main problem is that my company's network is closed (no one can use the global internet network), therefore the source control must work offline.

I tried using Git, because I saw it is working offline. but when I create repository on my company's server and cloned it to local computer, I was not able to push the changes to the original repository. the error message was "refusing to update checked out branch: refs/heads/master

Is there any way I can use source control offline¿

I want a source control with easy and intuitive UI.

SagiZiv
  • 932
  • 1
  • 16
  • 38

1 Answers1

2

You are missing some important information in your question:

  • What kind of Git server do you have?
  • Are you stuck with source-control-explorer?

Git is a decentralized SCM, it means you can work with or without a server and the commands push and pull are not required to do development. Back in the early version of Git, developers used emails to share their patches.

The possible issue you may encounter is that you did not use a bare-repository as the central repository. Take a look at this question.

Few years ago I was in the same situation as yours. I was working on a closed network without the possibility to install additional software. So we simply used Git on its own.

We created a bare-repository somewhere on the network and every developers added it as their remote origin. If you have write permissions on this Windows share it will work.

About the UI, they are many Git frontend, some are good, others are less intuitive. In overall I was always disappointed with IDE integrated Git UI (VS Code, Visual Studio...). So I would recommend to use Atlassian Source Tree which is free and intuitive.

But, if you want to use the real power of Git you had better to get familiarized with the command line interface. The learning curve is steep, but at the end of the day you will love it. I personally never use any GUI because there is no way I can use the full power of Git.

nowox
  • 25,978
  • 39
  • 143
  • 293
  • thanks for the reply, all projects are saved on the server and the employees have a network drive that connects to the server. I tried using bared git repository on the server and now I am able to push changes to it without error, but I don't see the files being added to the directory on the server. – SagiZiv Mar 24 '19 at 08:15
  • I tried to use source tree but it doesn't work offline, it tries to log in to bitbucket account – SagiZiv Mar 24 '19 at 08:15
  • nevermind it worked perfectly, thank you. does this solution works with gitignore file? – SagiZiv Mar 24 '19 at 08:21
  • Yes it will work with `.gitignore`. You will not see your files on the server since it is a bare repository. You will need to `clone` the repository to get a working copy locally. – nowox Mar 24 '19 at 13:21