GitHub使用教程——(1)使用GitHub创建简历展示页-创新互联

"如果我比别人看得远,那是因为我站在巨人的肩膀上"

成都服务器托管,创新互联提供包括服务器租用、资阳托管服务器、带宽租用、云主机、机柜租用、主机租用托管、CDN网站加速、国际域名空间等业务的一体化完整服务。电话咨询:18982081108

这是加利利的第一篇文章

系统环境:CentOS6.6桌面版

工具:VNC及Xshell

流程:

     创建仓库位置——初始化仓库——配置用户名及邮箱——下载简历模板——编辑简历——GitHub上创建仓库——上传本地代码到远程仓库——使用托管源——完成

action!

创建仓库位置:

[root@centos66 ~]# mkdir -p Code/CV
[root@centos66 ~]# cd Code/CV/

初始化仓库:

[root@centos66 CV]# git init                                    #初始化仓库
Reinitialized existing Git repository in/root/Code/CV/.git/

用户名及邮箱配置:

[root@centos66 CV]# git config --globaluser.name "userlx"
[root@centos66 CV]# git config --global user.email"15210680512@163.com"

下载简历模板:

[root@centos66 CV]# wget http://labfile.oss.aliyuncs.com/courses/624/cv-template.zip

编辑简历:

[root@centos66 CV]# unzip cv-template.zip
[root@centos66 CV]# mv cv-template/*.
[root@centos66 CV]# rm -rf cv-template*  __MACOSX*

[root@centos66 CV]#firefox index.html        #在VNC控制台打开 Xshell中打开会报错

修改简历,就是在网页上可以直接更改的,但是,,,这系统的输入法特别的不好用,我就只更改了几项内容;

GitHub使用教程——(1)使用GitHub创建简历展示页

#修改完,然后就Ctrl+s保存网页

GitHub使用教程——(1)使用GitHub创建简历展示页

创建仓库:

GitHub使用教程——(1)使用GitHub创建简历展示页

#输入仓库名称——创建仓库(默认设置为公有,私有是收费的)

GitHub使用教程——(1)使用GitHub创建简历展示页

#创建完成后可以看到提示操作

    快速设置-如果你之前做过类似的事情

    或者在命令行上创建一个新的存储库

    或者从命令行中推动现有的存储库

英语不好的朋友可以像我一样有道翻译;但翻译后一定要对应着学习一下!

OK!下一步!

上传本地代码到远程仓库:

[root@centos66 CV]# git add .                          #将所有修改过的工作文件提交暂存区
[root@centos66 CV]# git commit -m"first commit"        #添加备注first commit
[master (root-commit) cacc967] first commit
 26files changed, 2286 insertions(+), 0 deletions(-)
 create mode 100644 index.html
 create mode 100644 static/.DS_Store
 create mode 100644 static/css/.DS_Store
 create mode 100644 static/css/style.css
 create mode 100644 static/fonts/.DS_Store
 create mode 100644 static/fonts/demo.css
 createmode 100644 static/fonts/demo.html
 create mode 100644 static/fonts/iconfont.css
 create mode 100644 static/fonts/iconfont.eot
 create mode 100644 static/fonts/iconfont.svg
 create mode 100644 static/fonts/iconfont.ttf
 create mode 100644 static/fonts/iconfont.woff
 create mode 100644 static/p_w_picpath/.DS_Store
 create mode 100755 static/p_w_picpath/bg.jpg
 create mode 100644 static/p_w_picpath/weixin.png
 create mode 100644 static/js/.DS_Store
 create mode 100644 static/js/modal.js
 createmode 100644 static/js/script.js
 create mode 100644"\347\256\200\345\216\206\347\224\237\346\210\220\345\231\250.html"
 create mode 100644"\347\256\200\345\216\206\347\224\237\346\210\220\345\231\250_files/jquery.js"
 create mode 100644 "\347\256\200\345\216\206\347\224\237\346\210\220\345\231\250_files/remodal-default-theme.css"
 create mode 100644"\347\256\200\345\216\206\347\224\237\346\210\220\345\231\250_files/remodal.css"
 create mode 100644"\347\256\200\345\216\206\347\224\237\346\210\220\345\231\250_files/remodal.js"
 create mode 100644"\347\256\200\345\216\206\347\224\237\346\210\220\345\231\250_files/script.js"
 create mode 100644"\347\256\200\345\216\206\347\224\237\346\210\220\345\231\250_files/style.css"
 create mode 100644 "\347\256\200\345\216\206\347\224\237\346\210\220\345\231\250_files/weixin.png"
[root@centos66 CV]# git config --globaluser.name "userlx"                 #配置github用户
[root@centos66 CV]# git config --globaluser.email "15210680512@163.com"   #配置github邮箱
[root@centos66 CV]# git remote add orgin https://github.com/userlx/resume.git                                                                      #设置远程仓库地址,地址在上图中
[root@centos66 CV]# git push -u origin master             #推送到远程仓库
fatal: 'origin' does not appear to be a gitrepository
fatal: The remote end hung up unexpectedly                #报错
[root@centos66 CV]# git remote add orgin https://github.com/userlx/resume                                                                          #更换远程仓库地址
fatal: remote origin already exists.                      #提示远程仓库已存在
[root@centos66 CV]# git remote rm origin                  #删除远程仓库
[root@centos66 CV]# git remote add orgin 
                                                          #重新设置远程仓库地址 
[root@centos66 CV]# git push -u origin master             #再次推送到远程仓库 
 error: The requested URL returned error:403 Forbidden while accessing https://github.com/userlx/resume.git/info/refs                              #报错!提示请求失败
fatal: HTTP request failed

[root@centos66 CV]#vim .git/config                        #更改git配置文件
[core]
       repositoryformatversion = 0
       filemode = true
       bare = false
       logallrefupdates = true
[remote "orgin"]
       url = https://github.com/userlx/resume.git
       fetch = +refs/heads/*:refs/remotes/orgin/*

       url = https://github.com/userlx/resume.git
       改为:
       url = https://userlx@github.com/userlx/resume.git 
[root@centos66 CV]# git push -u originmaster                #再再次推送到远程仓库 
(gnome-ssh-askpass:46184): Gtk-WARNING **:cannot open display:    #cannot open display

#我是用xshell打开的,所以会显示cannot open display;于是就改用VNC,如下:

GitHub使用教程——(1)使用GitHub创建简历展示页

#提示输入密码(GitHub密码)

GitHub使用教程——(1)使用GitHub创建简历展示页

使用托管源:

GitHub使用教程——(1)使用GitHub创建简历展示页

#选择Settings——向下拉 找到GitHub Pags

GitHub使用教程——(1)使用GitHub创建简历展示页

#选择master branch——save

GitHub使用教程——(1)使用GitHub创建简历展示页

Congratulation! Your site is published at https://userlx.github.io/resume/

以后就可以访问userlx.github.io/resume了!

就是这么简单,但是!做之前先别急着敲命令,先知晓流程,理清思路,明白命令,之后再下手做;必定事半功倍!共勉··

另一个问题:我的简历好像还没改完整呢?

远程或者虚拟机上都不方便改,那就在自己电脑上改!下载个github客户端,就可以在本地直接打开随意操作;纯图形化操作,不再赘述;

GitHub使用教程——(1)使用GitHub创建简历展示页

拓展:Git知识点很多,GitHub很强大,该篇博客讲的知识九牛一毛;

    git讲解:廖雪峰讲git

    git命令:那个谁的博客

    VNC的使用就不说了吧

另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


分享文章:GitHub使用教程——(1)使用GitHub创建简历展示页-创新互联
文章链接:http://myzitong.com/article/giceg.html