How does Git interact with local and github code?
为情所困
为情所困 2017-05-02 09:35:00
0
1
582

I have installed the window systemgit, how can I configure it so that my local project code can interact effectively with github. I want to create a personal static blog, but I don’t know how to configure it. Thank you for your advice

为情所困
为情所困

reply all(1)
曾经蜡笔没有小新

Local configurationRSA密钥keyGenerate

#<你的用户名>
$ git config --global user.name "Your Name"

#<你所用邮箱>
$ git config --global user.email "Your@Email.com"

#<执行命令后会在电脑用户主目录下生成.ssh文件,有id_rsa和id_rsa.pub两个文件不管你用的是GitHub还是用了自己搭配的Git服务器,打开id_rsa.pub公钥全选复制,粘贴到Git服务器上面添加Add SSH Key的地方保存,这样本地Git和服务器Git关联起来了。>
$ ssh-keygen -t rsa -C "Your@Email.com"

#<从远程主机克隆一个版本库到本地>
$ git clone git@github.com:example/example.git

#<添加修改文件>
$ git add example.html

#<提交>
$ git commit -m '修改文件'

#<更新到远程>
$ git push origin master

You can refer to this Git for details. I hope it will be helpful to you

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template