-1

I am used to using Clearcase for our version management in my past. I am now handed the task of configuring git at my new job. Since the confgiration of git is slightly different than the traditional clearcase etc.., I wanted to get some blessings from the experts before I go too deep into the configuration.

Background : We have multiple applications to be maintained in git. Some are web-apps and some are other custom developed app. We have about 8 developers ( some work on the same project but, different files, mostly ). Our developers use Windows/Ubuntu platform.

With that in mind, this is what I have done so far: On a EC2 server that runs ubuntu, I have installed git repository.

  1. I have created just one repository so far ( I need to create 6 more ) for one of the project. This repository contains multiple subdirectories, as the project structure requires.
  2. For the single repo created, I have commited the initial version using git from my machine.
  3. Each developer using this repo has been asked to install git locally and have been asked to sync the code from the git repository to their local machine. so that they can then work on changes on the local machines and then push to git later.
  4. Each user can access mutiple repos.
  5. The actual applications are hosted on multiple servers. So, from git, the plan is to extract the code and migrate to different servers. I am not sure how I will do that. But, I will figure it out.

What I wanted to make sure is if I am on the right path of configuring git? Or am I making any grave mistake in the steps above. P.S : Sorry about the long question

Karthik

Fumbo
  • 110
  • 8
samjakar
  • 29
  • 6

1 Answers1

0

Yes: one Git repo per component/application is the best practice to follow.
I mention as much in "ClearCase to Git migration".

See also the differences between ClearCase and Git in this answer.


The OP adds:

I will have the users login to the git repo in the server using ssh -using the .pem file for the server rather than having individual user accounts for git.
Is that an OK way to go about providing access.

This link tells me that there should be 3 states for git. the .git repository is the server that hosts the repo. Working directory is my developer's git installation, right? Then should I have another staging state? Could you kindly clarify?

You can use ssh to access a remote Git repo as you suggest, but:

  • that remote repo must be a bare repo, meaning a repo with only the .git (no index or working tree)
  • it can include a post-receive hook in order to trigger a deployment (starting with the checkout of the bare repo in another folder)

Any clone of the ssh-accessed bare repo will be a full Git repo, with all three states in it (a .git, an index and a working tree).
Each individual Git repo, as cloned by the developers on their workstations, has those states.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250