More than 5 years have passed since last update.
サーバ側作業
ユーザー作成
adduser gitrepo
usermod -a -G gitrepo nekogeruge
リポジトリ作成
su - gitrepo
mkdir testproject.git
cd testproject.git
git --bare init --shared
クライアント側作業
クライアント側で作成したプロジェクトをpushする
mkdir testproject
cd testproject
git init
echo "git test" > readme
git add .
git commit -m "first commit"
git remote add origin ssh://configのHostに記述した名前/home/gitrepo/testproject.git
git push origin master
cloneして変更を加えてpushしてみる
git clone ssh://configのHostに記述した名前/home/gitrepo/testproject.git
echo "oeeee" >> readme
git add .
git commit -m "change test"
git push origin master
Why not register and get more from Qiita?
- We will deliver articles that match you
By following users and tags, you can catch up information on technical fields that you are interested in as a whole
- you can read useful information later efficiently
By "stocking" the articles you like, you can search right away
Sign upLogin