git学习

来源:互联网 发布:excel数据保护 编辑:程序博客网 时间:2024/05/16 11:13

http://blog.csdn.net/cc198877/article/details/7639130

Git 命令参数及用法详解 & Linux编程环境下版本控制 Git使用



如果使用HTTPS:

Create a new repository on the command line

touch README.mdgit initgit add README.mdgit commit -m "first commit"git remote add origin https://github.com/guochy2012/test.gitgit push -u origin master

Push an existing repository from the command line

git remote add origin https://github.com/guochy2012/test.gitgit push -u origin master

如果采用SSH:

Create a new repository on the command line

touch README.mdgit initgit add README.mdgit commit -m "first commit"git remote add origin git@github.com:guochy2012/test.gitgit push -u origin master

Push an existing repository from the command line

git remote add origin git@github.com:guochy2012/test.gitgit push -u origin master

 

使用HTTPS需要每次输入密码,SSH则不用,但SSH需要配置密钥 。

关于怎么产生密钥可以参见《Generating SSH Keys》一文


0 0