github的使用學習記錄

2021-09-09 08:31:47 字數 1334 閱讀 6407

git config --list
git config --global user.name "warmfrog"

git config --global user.email "[email protected]"

echo "# sharebook" >> readme.md

git init

git add readme.md

git commit -m "first commit"

git remote add origin

orgit remote add origin [email protected]:warmfrog/sharebook.git

git push -u origin master

git config --global user.name "warmfrog"

git config --global user.email "[email protected]"

git remote add origin

git push -u origin master

為了不每次都輸入使用者名稱和密碼,刪除以https提交的方式,然後修改提交方式

git remote rm origin

git remote add orign [email protected]:warmfrog/sharebook.git

再次push時

git push -u origin master
後面就可以使用

git push
來直接push了

將clone下來的專案修改後,如果需要push,則先將修改後的檔案add,commit後,再push

git add 修改的檔案

git commit -m "修改的內容提示"

git push

git rm 刪除的檔案

git commit -m "刪除的資訊"

git push

批量刪除或者修改後
git commit -a

git push

git stash
當我們改變本地檔案後,使用git pull命令時會有衝突,這時可以用stash隱藏改變,然後pull。pull之後可以

git stash list 列出改變

git stash drop 刪除改變

Github使用記錄

git add git commit m message git push repository name branch name git status git stash list git stash clear git stash git stash pop stash git pull rep...

github使用記錄

首先。得去官網上註冊上乙個賬號,我也下了乙個github的軟體。但是網頁版也可以建立 的。這裡,我覺得最讓人腦闊疼的是它全是英文!不過也體現了谷歌瀏覽器的強大,讓我想起來了node裡不是有個jade是強依賴性嘛,我覺得我對谷歌的感情就是這樣的。不過還是認為多用用英文的,剛開始磕磕絆絆,習慣以後也是可...

GitHub使用簡單記錄

根據 gotgithub 所做的一些整理 在github的頁面中可以使用鍵盤快捷鍵 1 按下問號 會在彈出視窗顯示當前頁面可用的快捷鍵。2 在專案的 瀏覽頁按下字母 w 彈出分支切換選單。3 按下字母 t 開啟目錄樹中檔案查詢和過濾。有2種辦法 1 在github建立新專案 2 從已有版本庫建立,然...