github經常使用命令總結(一)

1、建立repositorygit

在本地,打開git bash,切換到本地的項目目錄,執行如下命令:github

echo "#test" >> README.mdbash

git initide

git addREADME.mdthis

git commit -m"first commit"spa

git remote addorigin https://github.com/wanglanqing/test.gitblog

git push -u originmaster


2、刪除repositoryci

  1. 登陸github站點,進入【repository】頁面,點擊要刪除的項目名稱,如testrem

  2. 進入項目頁面,點擊右上側的setting Tab籤get

  3. 進入setting頁面後,點擊最下方的【delete this repository】

  4. 點擊刪除後,在彈出的頁面,輸入並確認要刪除的項目

  5. 輸入密碼進行確認刪除


3、項目中新增文件後同步到repository中

git add ./dir1/dir2/filename

git commit -m 「」

gitpush –u origin master


4、文件內容更新後,如何同步到遠程倉庫中

git status

git commit –a

gitpush –u origin master

fc7fdcfc2916ba3c0bfc3283c74e0558.jpg

相關文章
相關標籤/搜索