1. 程式人生 > >git 和 github 的用法

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