https://w3c.hexschool.com/git/cfdbd310 參考網站
https://www.youtube.com/watch?v=Mx8G8aJyIiw
https://www.youtube.com/watch?v=cwOFAWaCJOs&t=128s
1.安裝 bit bash(上網查),可以建在D:\XXX
1-1.註冊github 1-2.sourcetree安裝 註冊Bitbuket bkplayxxxx
2.若在D:\MyCode 建立資料夾,按滑鼠右鍵\選擇\Open Git bash here
3.出現$ 打$git init 建立起一個git repository 關閉再執行一次
4.若在D:\MyCode\ex.txt 隨意建立,打$git status會告訴你系統未追踪ex.txt!
5.$git add ex.txt 加入追踪,打$git status該檔會變綠色
6.$git commit 類似存檔功能,存到github
第一要輸入mail 及user
$git config --global user.email "you@example.com"
$git config --global user.name "Your Name"
7.$git log
8.$git config --list 查看git hub建立的內容
A.到GitHub按"+"
Create a new repository建立資料庫
B.
echo "# ForDavid" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/Dxxxxxxxx/ForDavid.git
git push -u origin main
基本指令架構
1.打開git bash
2.$cd <拉入資料夾MyCode>
3.$git init 開啟本地"數據庫"
4.開始編輯>打開Visual Studio Code>拉入資料夾MyCode
5.看狀態 $git status 未追踪
6.開始追踪 $ git add . 把所有檔案加入
7.加入本地數據庫 $ git commit -m "說明"
8.$git log
以上動作均可以用SourceTree完成
沒有留言:
張貼留言
注意:只有此網誌的成員可以留言。