xaizek / rocketgit (License: AGPLv3+) (since 2018-12-09)
Light and fast Git hosting solution suitable to serve both as a hub or as a personal code storage with its tickets, pull requests, API and much more.
<root> / inc / repo / repo.php (014351902a631cd2f4607f4b4405bd7bcbc482f2) (773B) (mode 100644) [raw]
<?php
rg_log("FILE: /inc/repo/repo");

// This page is shown when user press main menu "My repositories"

$_repo = '';

if (empty($paras)) {
	if (rg_repo_have($db, $rg['login_ui']['uid']) == 0)
		$_subop = 'create';
	else
		$_subop = 'list';
} else {
	$_subop = array_shift($paras);
}

$rg['repo_menu'][$_subop] = 1;
$_repo = rg_template("repo/menu.html", $rg, TRUE /* xss */);
$_repo .= '<div class="generic_body">' . "\n";

switch ($_subop) {
case 'create':
	$rg['form_url'] = "/op/repo/create";
	$_repo .= rg_repo_edit_high_level($db, $rg);
	break;

case 'search':
	$_repo .= rg_repo_search_high_level($db, $rg, $rg['login_ui'],
		'/op/repo');
	break;

case 'list':
	$_repo .= rg_repo_list($db, $rg, "", $rg['login_ui']['uid'], 0);
	break;
}

$_repo .= '</div>' . "\n";
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/rocketgit

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/rocketgit

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master