top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Best practice of organizing the GIT repositories?

+1 vote
728 views

I want to understand the best practice of organizing the GIT repositories. Let's say:
1. We are a large bank with many line of businesses and tons of application.
2. Each LOB has a large number of applications.

How many repositories shall I use? How do we organize the applications inside one repository? Any reference?

posted Feb 24, 2014 by Tarun Singhal

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

I personally use one repository per application/library (and use submodules if an application needs a particular library). All these repos sit on the same one server, and I use gitosis to manage access to them (others may prefer gitolite).

answer Feb 24, 2014 by Kumar Mitrasen
Similar Questions
+1 vote

I have git version 1.8.4.msysgit.0 installed. If I run this as a daemon, where are the repositories located? (i.e. where do i do a mkdir foo.git; cd foo.git; git init --bare?)

How do I change where the (server) repositories live?

+5 votes

I read this page about git hook: http://git-scm.com/book/en/Customizing-Git-Git-Hooks and I still have some questions. I have a git server with some bare repos and I want create something like a continuos integration test so, I need to run a script when someone push on these repos. Main problem is that these repos are "bare" and doesn't contains any file. there is a way inside my script to "extract" files from a bare repo or i need to create a working copy?

If i create a separated working copy, how can i pull out this working copy inside my script? I tried something like this, but seems not working
cd /home/git/workingcopy/myawesomeappgit pull./run_test.sh

+1 vote

I just had the bare vs non-bare repo concept smack me in the face. Painful way to learn things, but I won't forget it any time soon. Since my remote repos are no longer work trees, how can I keep two bare repos in sync? This is primarily for DR purposes.

Here's more detail in case it'll help:
I have two rhel6 systems running git 1.7.1 that will be maintaining OS and web configuration files for a variety of teams, once I get the bugs in my understanding ironed out. One git server is in datacenter A (prod) where most of the updates will be occurring. Appropriate people will clone the bare repo, make their updates and push it back. The other git server is at our warm DR site. While rare, updates to this server should be possible.

I need to be able to fetch changes from the production git server and apply them to the DR one. When I tried it straight, I got the expected "fatal: This operation must be run in a work tree"

I suppose I could hack out a script to pull the configs down to a temp repo and push them back up to the DR one (and vice versa), but that seems like a kludge. As flexible and seemingly well thought out as git appears to be, I have to believe there's a better approach.

Could someone clue me in on what I'm missing or how a generic DR process is typically set up?

0 votes

I installed CentOS 6.4 on a partition on my computer a few days ago, and I'm trying to equip it with the software i think i need.

For example, i need, or i think i need, a couple of gnustep programs for uploading images from my digital camera (the programs being openapp and Camera.app).

I imagine that these are old enough that they must surely exist in rpms somewhere.

But i apparently don't know how to google around sufficiently well to locate a repository that contains them, or even that contains packages that i know exist as rpms. For example: i'm certain that an rpm exists for
a package called gnustep-make, because its name popped up on http://forums.fedoraforum.org/showthread.php?t=279655 But if i try 'sudo yum install gnustep-make' i get 'No package gnustep-make available.'
So that clearly means that i don't have enough repositories configured for use.

So, i'd be grateful for any pointers to a list of CentOS-compatible repositories that i can put in the yum configuration (/etc/yum.repos.d or elsewhere).

...