stay tuned πΌ - v1.0.0 - π§
- this is an educative tool
- I need a simple tool to train myself with git, feature flow, ... and simulate "working with team".
- I use https://github.com/substack/git-http-backend wit ExpressJS
update settings in
go.js(or manually set variables and rungit-server.js) variables:
- GIT_HTTP_PORT
- GIT_SHARED_REPOSITORIES_LOCATION: the sub directory to store git shared repositories (default is
repos)
./go.js
planned with the next version: you'll be able to do this from the browser
- go to the
GIT_SHARED_REPOSITORIES_LOCATIONsub directory (eg:cd repos) - type (eg)
./init-bare-repo acme yo, it will create a shared repositoryyo.gitfor the owner/organizationacme:
βββ acme
βΒ Β βββ yo.git
βΒ Β βββ HEAD
βΒ Β βββ branches
βΒ Β βββ config
βΒ Β βββ description
βΒ Β βββ hooks
βΒ Β βΒ Β βββ applypatch-msg.sample
βΒ Β βΒ Β βββ commit-msg.sample
βΒ Β βΒ Β βββ post-update.sample
βΒ Β βΒ Β βββ pre-applypatch.sample
βΒ Β βΒ Β βββ pre-commit.sample
βΒ Β βΒ Β βββ pre-push.sample
βΒ Β βΒ Β βββ pre-rebase.sample
βΒ Β βΒ Β βββ pre-receive.sample
βΒ Β βΒ Β βββ prepare-commit-msg.sample
βΒ Β βΒ Β βββ update.sample
βΒ Β βββ info
βΒ Β βΒ Β βββ exclude
βΒ Β βββ objects
βΒ Β βΒ Β βββ info
βΒ Β βΒ Β βββ pack
βΒ Β βββ refs
βΒ Β βββ heads
βΒ Β βββ tags
- initialize a repository named
yo(of theacmeorganization) and set theconfigfile of the repository as if you are babs:
mkdir yo
cd yo
git init
echo "[user]" >> .git/config
echo " name = babs" >> .git/config
echo " email = babs@typunsafe.org" >> .git/config
- create a file with content:
cd yo
echo "# Yo project" > README.md
git add .
git commit -m "add README.md"
git push http://localhost:5555/gitsrv/acme/yo.git master
- go to
/repos/acme/yo.git - type
git log, and you'll get something like that:
commit 61de85e64436c8ca5efa3ad6f7b28c27a5e4d4de
Author: babs <babs@typunsafe.org>
Date: Thu Dec 15 07:25:13 2016 +0100
Now, you can play as an other user: buster:
- clone the repository named
yo(of theacmeorganization) and set theconfigfile of the repository as if you are buster:
git clone http://localhost:5555/gitsrv/acme/yo.git
cd yo
echo "[user]" >> .git/config
echo " name = buster" >> .git/config
echo " email = buster@typunsafe.org" >> .git/config
- add a new file and push to the server:
cd yo
echo "some documentation" > DOC.md
git add .
git commit -m "add DOC.md"
git push http://localhost:5555/gitsrv/acme/yo.git master
- go to
/repos/acme/yo.git - type
git log, and you'll get something like that:
commit 9f9b0b0fc0ef37ed9b8b89f9367aadf23c6ba525
Author: buster <buster@typunsafe.org>
Date: Thu Dec 15 07:31:28 2016 +0100
add DOC.md
commit 61de85e64436c8ca5efa3ad6f7b28c27a5e4d4de
Author: babs <babs@typunsafe.org>
Date: Thu Dec 15 07:25:13 2016 +0100
more to come... π§