Github操作使用記錄

(1)如果要下載github某個版本庫內容直接使用:

git cone https://github.com/xxoo/xx.git

or

在頁面有個Download ZIP

(2)如果自己新建了一個項目(版本庫)要提交到github上去。方法如下:

$sudo mkdir mysql
$sudo git init
Initialized empty Git repository in /opt/github/mysql/.git/
# git status 
# On branch master 
# 
# Initial commit 
# 
nothing to commit (create/copy files and use "git add" to track) 
$sudo ls
test.html
$sudo git status 
# On branch master 
# 
# Initial commit 
# 
# Untracked files: 
# (use "git add <file>..." to include in what will be committed) 
# 
# test.html 
nothing added to commit but untracked files present (use "git add" to track)
$sudo git add test.html
$sudo git status 
# On branch master 
# 
# Initial commit 
# 
# Changes to be committed: 
# (use "git rm --cached <file>..." to unstage) 
# 
# new file: test.html 

 

(3)如果你要添加所有文件使用:

$sudo add . 
#或者使用
$sudo add *   

$sudo git commit -m "第一次變更"                   ##表示日誌描敘信息
$git push   #提交信息

 

圖示如下:

 

 

 

 

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