logs – create git repository server

# berikan akses login shell ke user git, 
# ubah file ~/.ssh/authorized_keys ke user
$ sudo shch git
    input /bin/bash

# masukan user git ke dalam group vbox
# agar git dapat menulis ke shared folder virtualbox
$ sudo usermod -a -G vboxsf git

# test, login user git, buat folder di shared
$ su git
$ cd /media/sf_repo
$ mkdir suropati-dashboard.git && cd suropati-dashboard.git

# buat repository


## @workstatsion
# pada source code lakukan init dan commit
$ cd ~/tmp/www/suropati
$ git init
$ git add .
$ git commit -m 'first initial 15-december-2015'

# create remote origin ex: git remote add origin ssh://user@host:1234/srv/git/example
$ git remote add origin ssh://git@your.ip.paste.here:port/media/sf_repo/suropati-dashboard.git
$ git push origin master

# test clone repo
$ mkdir ~/tmp/www/tmp && cd ~/tmp/www/tmp
$ git clone ssh://git@your.ip.paste.here:port/media/sf_repo/suropati-dashboard.git

# buat perubahan dan push ke server repo
~/tmp/www/tmp $ cd suropati-dashboard
# create new file
$ echo "dashboard source code"  >> readme.md
$ git status
$ git add readme.md
$ git status
$ git commit -m "add file readme.md"
$ git push ssh://git@your.ip.paste.here:port/media/sf_repo/suropati-dashboard.git

# pull perubahan yg dilakukan oleh orang lain
$ cd ~/tmp/WWW/suropati
$ git pull ssh://git@your.ip.paste.here:port/media/sf_repo/suropati-dashboard.git

Published by

G3n1k

just to remember what i had known :)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s