On ssh-server install git:
$ sudo apt-get install gitCreate empty folder for git:
$mkdir gitkansio && cd gitkansio
Initialize git repository
$git --bare init
On local machine:
Create Git folder with Git:$mkdir gittest && cd gittest
$sudo apt-get install git
$git init
Create some files
$ echo "lol" >> test.txt
Commit to Git
$git add .
$git commit -m "testing git"
Add remote repository
$git remote add origin ssh://username@server.com:1234/home/user/gitkansio
Push to remote
$git push origin master
$ git branch --set-upstream master origin/master
Clone the repository:
$ git clone ssh://gitmies@www.nikiahlskog.com:4242/home/gitmies/gitkansio
to remove: $ git remote rm origin
to remove: $ git remote rm origin
Check remotes with command: git remote -v
Set new remote: git remote set-url origin ssh://gitman@365rent.fi:2222/home/gitman/365rentrepo
Ei kommentteja:
Lähetä kommentti