关于git, github

Git 堪称版本控制瑞士军刀。这个可靠、多才多艺、用途多样的校 订工具异常灵活,以致不易掌握,更别说精通了。

正如Arthur C. Clarke所说,足够先进的技术与魔法无二。这是学习Git的好办法:新手 不妨忽略Git的内部机理,只当小把戏玩,借助Git其奇妙的能力,逗逗朋友,气气敌人。

为了不陷入细节,我们对特定功能提供大面上的讲解。在反复应用之后,慢慢地你会理 解每个小技巧如何工作,以及如何组合这些技巧以满足你的需求。


Git命令:  http://gitref.org/creating/

Github的一个10分钟在线小教程: try.github.com

Git高阶, 一些深入讲解: http://www-cs-students.stanford.edu/~blynn/gitmagic/intl/zh_cn/

Git for computer scientists: http://eagain.net/articles/git-for-computer-scientists/

Git最新版本地址: https://launchpad.net/~git-core


Git命令:

1.显示有几个remote:   $ git remote show

2.显示具体一个remote 信息 :  $ git remote show master

3. 如果git版本1.7.9以及以后,连接github用https, 每次会要求输入密码,这个指令可以让你15分钟以内不需要输入密码:

$ git config --global credential.helper cache

或者让时间更长一点: $ git config credential.helper 'cache --timeout=3600'

4. 如果git版本1.7.9以前,

With versions of git before 1.7.9, this more secure option is not available, and you'll need to change the URL that your origin remote uses to include the password in this fashion:

https://you:[email protected]/you/example.git

... in other words with :yourpassword after the username and before the @. You can set a new URL for your origin remote with:

git config remote.origin.url https://you:[email protected]/you/example.git

Make sure that you use https and you should be aware that if you do this, your github password will be stored in plaintext in your .git directory, which is obviously undesirable.







發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章