# update packages
1 |
sudo apt-get update |
# install gitolite server
1 |
sudo apt-get install gitolite3 |
# rename (not necessary) user gitolite3 to git
1 |
sudo usermod gitolite3 –login git |
# clone git admin dir to your home account
1 2 |
cd ~ git clone [email protected]:gitolite-admin |
# make changes in gitolite.conf — add new repo
1 2 3 |
“`repo web-app RW+ = admin“` |
# show status
1 |
git status |
# add files to repo
1 |
git add -A . |
# commit your changes
1 |
git commit -m ‘Added new repo’ |
# for use simple git push
1 |
git config –global push.default simple |
# push changes to repo
1 |
git push |
All done, your repo is ready.
Now go to dir with your app.
1 |
cd ~/web-app/ |
# initialize dir for git
1 |
git init |
# add url of «remote» repo
1 |
git remote add origin ssh://[email protected]:8822/web-app |
# check it
1 |
git remote -v |
# commit and push your repo
1 2 3 4 5 6 7 |
git status git add -A . git commit -m ‘Initial commit’ git push –set-upstream origin master |
# clone repo on desktop
1 |
git clone ssh://[email protected]:8822/web-app |
Leave a Reply