2017-05-09   git   web 

一時的なgitリポジトリをサーバに作るRubyスクリプト

コード

実行の様子(サーバ)

$ pwd
/home/YOURNAME
$ ruby create_empty_bare_repository.rb
Initialized empty Git repository in /home/YOURNAME/cixawa-20170509100453.git/

cixawa-20170509100453.git is created.
You'll execute following commands locally.
----
mkdir cixawa-20170509100453
cd cixawa-20170509100453
git init
echo Hello > README
git add .
git commit -m 'Initial commit.'
git remote add origin ssh://YOURNAME@EXAMPLE.COM:/home/YOURNAME/cixawa-20170509100453.git
git push origin master
git remote -v

参照

 2017-05-09   git   web