os.system(
			'cd %s; git rm --cached %s; git add ./%s/*' % (
			website_dir, folder, folder
		))

def enable(self, folder):
		host_name = self.base.options.ip
		email = self.base.options.user
		isHost(host_name)
		self.__userExists(email)

		data = self.getHostData(host_name)
		website_dir = data['website_dir']
		full_path = '%s/%s' % (website_dir, folder)
		full_path_git = '%s/.git' % full_path
		repository = '%s/%s/%s.git' % (self.data[email]['dir'], host_name, folder)
		real_repository = '%s/%s.git' % (self.base.git['repositories'], host_name)
		user_hook = '%s/hooks/post-receive' % repository
		repo_hooks = '%s/.git/hooks' % website_dir
		origin = md5(email)

		if not fileExists(full_path):
			error_message('Folder %s not exists!' % full_path)

		if not host_name in self.data[email]['projects']:
			self.data[email]['projects'][host_name] = []

		if folder in self.data[email]['projects'][host_name]:
			error_message('Repository already exists for this user!')
		self.data[email]['projects'][host_name].append(folder)

		self.__makeDir(repository)
		os.system('cd %s && git init --bare 1> /dev/null' % repository)
		putFile(
			'%s/.gitignore' % full_path,
			getTemplate('git-jail-gitignore-default')
		)

		os.system(
			'cd %(full_path)s && git init 1> /dev/null && '
			'git remote add %(origin)s %(repository)s && '
			'git add . && '
			'git commit -am "Initial commit" 1> /dev/null && '
			'git push %(origin)s master 1> /dev/null' % locals()
		)

		os.system('chown git:git -R %s' % full_path)
		os.system('chown git:git -R %s' % repository)
		os.system('chown git:git -R %s' % real_repository)
		os.system('chown git:git -R %s/.git' % website_dir)


		'''
		os.system(
			'cd %s; git rm --cached %s; git add ./%s/*' % (
			website_dir, folder, folder
		))
		'''

		key = hash('%(email)s-%(host_name)s-%(folder)s' % locals())

		templates = {
			user_hook: 'git-jail-post-receive-user-repo',
			'%s/post-commit' % repo_hooks: 'git-jail-post-commit-repo',
			'%s/post-receive' % repo_hooks: 'git-jail-post-receive-repo',
			'%s/hooks/post-receive' % real_repository: 'git-jail-post-receive-real-repo',
		}

		putFile(
			'%s/hooks/post-receive.db' % real_repository,
			'%(website_dir)s;%(full_path)s;.;%(key)s;%(origin)s;' % locals(),
			'a'
		)

		putFile(
			'%s.db' % user_hook,
			'%(full_path)s;%(website_dir)s;./%(folder)s/*;%(key)s;%(origin)s;' % locals(),
			'a'
		)

		putFile(
			'%s/post-receive.db' % repo_hooks,
			'%(full_path)s;%(real_repository)s;%(key)s;%(origin)s;' % locals(),
			'a'
		)

		for f,t in templates.items():
			putFile(f, getTemplate(t) % locals())
			os.system('chmod +x %s' % f)

		info_message('Successful!')