Setup Git
http://www.tomdalling.com/blog/software-processes/how-to-set-up-a-secure-git-server-at-home-osx/
* /etc/ssh/sshd_config, must delete the comment tag "#"
touch .ssh/authorized_keys //new file
open -a "TextEdit" .ssh/authorized_keys //open with textedit
1) 在 server 端创建空的 repository //initialize server git
$ cd path/to $ mkdir newrepo.git $ cd newrepo.git $ git init --bare # --bare flag 只是用来存储 pushes,不会当做本地 repository 来使用的。
2) 在 client 端,创建 local repository 并 push //creat local git and add to remote
$ cd path/to $ mkdir newrepo $ cd newrepo $ git init $ touch README $ git add . $ git commit -m "initial commit" $ git remote add origin git@yourComputerName:/path/to/newrepo.git # 如果直接之前在 server 端创建的 newrepo.git 是在 home 目录,则这里地址为:git@yourComputerName:newrepo.git
$ git push origin master
相关推荐
formula 2020-11-12
huhongfei 2020-11-05
乾坤一碼農 2020-10-27
liumengyanysu 2020-10-22
E哥的aws认证攻略 2020-10-15
tianyafengxin 2020-10-08
guying 2020-10-05
好脑筋不如烂笔头 2020-09-17
nebulali 2020-09-11
佛系程序员J 2020-09-15
fenggit 2020-09-15
JustHaveTry 2020-09-11
兄dei努力赚钱吧 2020-09-06
IngeniousIT 2020-08-25
liumengyanysu 2020-08-17
guying 2020-08-16