git 和 github 的用法

一、如何创建GitHub账号

 1.注册账号

  2.注意事项: 

(1)用户名只能包含字母数字字符或单个连字符,并且不能以连字符开头或结尾。

(2)密码至少使用一个字母,一个数字和七个字符。

二、使用 Linux 上传代码

1.第一次上传代码

(1)git clone https://github.com/MonologueX/ceshi-.git

(2)echo "# ceshi-" >> README.md

(3)git init

(4)git add README.md

(5)git commit -m "first commit"

(6)git remote add origin https://github.com/MonologueX/ceshi-.git

(7)git push -u origin master

2.以后上传代码

(1)git add test.c

(2)git commit -m "ceshi"

(3)git push -u origin master

猜你喜欢

转载自blog.csdn.net/xinwenhuayu/article/details/82851871