"若是我比别人看得远,那是由于我站在巨人的肩膀上"css
这是加利利的第一篇文章html
系统环境:CentOS6.6桌面版jquery
工具:VNC及Xshellgit
流程:github
建立仓库位置——初始化仓库——配置用户名及邮箱——下载简历模板——编辑简历——GitHub上建立仓库——上传本地代码到远程仓库——使用托管源——完成shell
action!vim
建立仓库位置:centos
[root@centos66 ~]# mkdir -p Code/CV [root@centos66 ~]# cd Code/CV/
初始化仓库:
bash
[root@centos66 CV]# git init #初始化仓库 Reinitialized existing Git repository in/root/Code/CV/.git/
用户名及邮箱配置:app
[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中打开会报错
修改简历,就是在网页上能够直接更改的,可是,,,这系统的输入法特别的很差用,我就只更改了几项内容;
#修改完,而后就Ctrl+s保存网页
建立仓库:
#输入仓库名称——建立仓库(默认设置为公有,私有是收费的)
#建立完成后能够看到提示操做
快速设置-若是你以前作过相似的事情
或者在命令行上建立一个新的存储库
或者从命令行中推进现有的存储库
英语很差的朋友能够像我同样有道翻译;但翻译后必定要对应着学习一下!
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密码)
使用托管源:
#选择Settings——向下拉 找到GitHub Pags
#选择master branch——save
Congratulation! Your site is published at https://userlx.github.io/resume/
之后就能够访问userlx.github.io/resume了!
就是这么简单,可是!作以前先别急着敲命令,先知晓流程,理清思路,明白命令,以后再下手作;一定事半功倍!共勉··
另外一个问题:个人简历好像还没改完整呢?
远程或者虚拟机上都不方便改,那就在本身电脑上改!下载个github客户端,就能够在本地直接打开随意操做;纯图形化操做,再也不赘述;
拓展:Git知识点不少,GitHub很强大,该篇博客讲的知识九牛一毛;
git讲解:廖雪峰讲git
git命令:那个谁的博客
VNC的使用就不说了吧