首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 互联网 >

配备github

2012-12-28 
配置github1.$ sudo apt-get installgit或者 sudo apt-get install git-core2.$ git init初始化gitls -agi

配置github
1.$ sudo apt-get installgit  或者 sudo apt-get install git-core2.$ git init     初始化git
      ls -a
      git status  当前状态
3. git add README
4. git commit -m "1st"
5.git config --global user.name "PeterWang"
6.git config --global user.email "happypeter1983@gmail.com"
7. git log
8. git log -p
9.sudo apt-get installtig
10.git commit -a
11.git diff
12.git config --global core.editor vim
     git commit -a -v
     git config --global alias.ci "commit -a-v"
~/.gitconfig

[user]      name = Peter Wang      email = happypeter1983@gmail.com  [core]      editor = vim  [alias]      ci = commit -a -v  
 
window下的github应用
Git & GitHub 操作说明浏览器窗口
1. 使用你自己的账号,登陆 GitHub.com    
2. 登陆后,右上角有你的名字,旁边有3个图标。    
3. 点击第1个图标,Create a New Repo    
4. Repository name 填写 myNCCL  Description (optional) 填写 this is my NCCL exercise    
5. 选中 Initialize this repository with a README     
6. 点击 Create Repository    
7. 然后就可以看到 myNCCL 的项目和一个 Readme 文件  
Git Bash 窗口
1. 运行 ssh -T git@github.com 看是否有 hi,yourname ,如果有则成功。    
2. cd ~    
3. cd .ssh    
4. ssh-keygen -t rsa -C "your_email@youremail.com"    
5. ls  cat *.pub    
6. notepad *.pub  ctrl + a 全选  ctrl + c 复制    切换到浏览器窗口      
7. 右上角有你的名字,旁边有3个图标。
点击第2个图标,Account Settting  
左侧顺数第7个选项 SSH Keys ,点击进入 Add SSH Key   
 填写 title: git bash  
填写 key:  ctrl + v 粘贴 (就是刚才的 .pub 文件内容)    密码: github 网站的密码    回到 Git Bash 窗口  8. ctrl+c 结束 notepad    9. 重新 ssh -T git@github.com ,此时应该成功。  
添加自己写的 hello.c 文件进入 myNCCL 项目中
1. cd ~    
2.1 git config  --global user.name xxx  
2.2git config  --global user.email  xxx@xxx.com  
2.3 (这一步不是必须要做的,如果有问题可以做) git config  --global push.default simple    
3.1 mkdir github  
3.2 cd github    
4. git clone git@github.com:limingth/myNCCL.git    
5. cd myNCCL  
5.1 edit hello.c    
6. git add hello.c  
7. git commit -a -m "just add hello.c"  7
. git push    此时可以修改一下 hello.c ,然后重复 6,7 两步即可  8. 如果要添加大量代码,可以用 git add .  9. 如果要删除某个文件,可以用 git rm a.c  
 
参考:https://github.com/limingth/NCCL/blob/gh-pages/INSTALL.md
在这里推荐俩个人的github网址:亚嵌李明老师:https://github.com/limingth  我从李明老师那里学了很多知识, 在这里感谢李明老师的指导,大家去他的网站可以看到丰富的知识。
Peter: https://github.com/happypeter 
我的github:https://github.com/lujinjianst
 
 

学习github强烈推荐看:

http://www.worldhello.net/gotgithub/


1楼lujinjian605894472昨天 19:13
这是配置github比较好的一篇文章, 希望大家关注github版本控制系统, 关注开源项目。

热点排行