1

I’m new to Git and version control and want to implement it on a project in SAS that I have been working on for several years in a Windows environment. We have a Production folder, a Test Folder, and a folder for each developer (i.e. Dev1, Dev2, etc.) and I’m trying to figure out how to set things up.

As I look through the posts and on various tutorials, they often say to create a bare repository and then clone it so that you can push or pull your code using the bare repo. However whenever I do that the cloned repository adds another folder layer that I don’t want. For instance if I create a folder \BareRepo and then clone it into \Production then I end up with \Production\BareRepo. My code in SAS is expecting files to be in specific folders and I’d prefer not to have to modify the code to have it point to a different place.

I can't seem to figure out how to use Git in my environment without having to restructure my application. Is there a way to do that and if so, how?

1
  • Try this test: copy your entire folder structure to a new folder. Go into that folder and type git init. That folder and its subdirectories are now under git control. Didn't have to change any directory structures or anything. The top-level folder you're talking about is really just how github/bitbucket/etc. clone - they clone into a directory that by default is named after the project. Commented Sep 16, 2014 at 15:41

1 Answer 1

1

You can specify the directory when you clone the repo. So if you are cloning BareRepo, you can do this:

git clone git://path/to/bare/repo directoryName

This will clone the BareRepo into a directory called 'directoryName'.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.