Git

来源:互联网 发布:新ubantu系统安装caffe 编辑:程序博客网 时间:2024/06/03 18:11

在做安卓课程设计的时候
发现github的客户端惊奇的好用,只要熟悉几个操作就好了
作为一个工具,用的时候去查查就够了

原理什么的就不介绍了
下面放几个学习过程中的参考资料

对于初学者而言
官方的Hello World教程反而是最好用的

参考资料
- github官方新手教程 看这个就够了
- 廖雪峰Git教程 听说不错
- 进阶 pro git 多半不会看
- Git版本控制软件结合GitHub从入门到精通常用命令学习手册
- 如何正确接收 GitHub 的消息邮件

其他
乱七八糟
花里胡哨的 好资源
还有很多,
但 管那么多干什么,够用就好

===========16.12.22更新=======
在ubuntu上安装git,配置用户名邮箱

sudo apt-get install gitgit config --global user.name "Your Name"git config --global user.email "email@example.com"

cd进入项目根目录,初始化git

git init

将当前目录中的内容添加到 git创建好的空项目中

git add .

添加要忽略的文件名单vi .gitignore文件内容如下

*.pyc*.db*.sqlite3

执行下面命令

git add .gitignore

本地提交代码

git commit -m "init project"

连接github

1.use ls -al ~/.ssh to see if there already have some SSH keys, if nothing, go ahead.

2.Generating a new SSH key and adding it to the ssh-agent:

ssh-keygen #连续回车3次,使用默认选项eval "$(ssh-agent -s)" # start the ssh-agent in the background 如果不添加到ssh-agent中,就算开着ss,系统代理改成了socks代理,也无法浏览网页ssh-add ~/.ssh/id_rsa # add your SSH key to the ssh-agent

3.Adding a new SSH key to your GitHub account, copy ~/.ssh/id_rsa.pub and paste in GitHub’s SSH key list.

4.Test: ssh -T git@github.com

0 0
原创粉丝点击