Try   HackMD

Git/Github 初心者學習 重點整理 Day 1
Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

tags: Git/Github 複習用 六角學院 高見龍
文章目錄

教材

Git遠端開發特訓班
Git & GitHub 教學手冊 - Git 環境教學 | W3HexSchool
六角學院 Git - YouTube清單

影片內容重點複習

指令

CMD命令提示字元

Window 說明
cd [路徑] 前往資料夾路徑
mkdir [檔案名稱] 新增資料夾
dir 顯示資料夾內容
code [文件名稱.語言] 用IDE撰寫code
code . 開啟code文件
cls 清除CMD畫面上的內容
del 刪除檔案

Git指令

在 Windows 中顯示隱藏的檔案、資料夾和副檔名

Window 說明
git -v 顯示git版本確認是否安裝
git init 初始化數據庫
git config list 查詢 git 設定內容
git config global user.name "gon" 設定姓名 (只要設定一次)
git config global user.email "gonsakon@gmail.com" 設定Email (只要設定一次)

Git流程

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Window 說明
cd [路徑] 前往資料夾路徑
git init 初始化數據庫
git status 查詢當前狀態
git add . 將檔案加入到索引
git commit -m "說明版本內容" 將索引檔案,變成一個更新(commit)
git log (按Q離開) 觀察 commit 歷史紀錄(更新幾次)
自訂義 簡寫/縮寫

Git 遠端 Repository 操作 - Quip

自訂語法撰寫
git config --global alias.簡寫 指令語法
看config內容是否有改寫
git config --list

有改寫的
git config --global alias.st status
git config --global alias.ci commit
git config --global alias.co checkout
git config --global alias.br branch

Window 簡寫/縮寫 說明
git status git st 查詢當前狀態
git commit -m "說明" git ci -m "說明" 將索引檔案,變成一個更新(commit)

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

練習建檔與sourcetree運用

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

上傳到github遠端數據庫

建立一個New repository

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

將本地檔案新增到github

將下方指令依序輸入

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

git remote add origin https://github.com/chiaoshin/Git-Github_Learn.git git branch -M main git push -u origin main
  1. 將本地數據庫,資料(config)連結到遠端數據庫位址
  2. 開一個主要分支
  3. 將資料推進去 (
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →
    會要求登入 github帳號密碼)

成功更新檔案

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

建立一個Github page


chiaoshin/Git-Github_Learn: 【Git/Github】新增遠端數據庫(repo)練習

再次送到遠端數據庫

  1. 利用sourcetree push上去
  2. 在命令提示字元輸入 git push -u origin main or git push

當 遠端資料庫與本地端衝突時,需要解衝突,將它合併一起。

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
在命令提示字元輸入 git pull --rebase origin main
解決辦法:git錯誤

檔案過大,無法上傳github(100MB限制)。
Github 超過 100mb 檔案上傳方式 | 一人の旅行記

強制推送,當本地端傳不上去。
【狀況題】怎麼有時候推不上去 - 為你自己學 Git | 高見龍

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

最後更新日期

第一版2022 7 15 , 12:30 AM

第二版2022 10 25 , 10:30 AM

第三版2022 12 15 , 4:54 PM

第四版2022 12 28 , 7:50 PM

最後版2022 12 28 , 7:50 PM