Git

閱讀時間約 5 分鐘

1. Outline

Takeaway

  • Setting up Git and verifying installation
  • Configuring your Git username and email
  • Initializing a new Git repository
  • Staging and committing changes
  • Creating a Github Repository
  • Creating New Git Branches
  • Connecting your local repository to GitHub using SSH
  • Pushing your project to a remote repository

My Note

  • check the version: git --version
  • get a repository of your project: git init -b main
  • staging, put the project file above into this main branch: git add .
  • commit the changes: git commit -m "init"
  • ssh key: ls -al ~/ .ssh
  • go to GitHub docs and search "SSH key" - Generating a new SSH key
  • copy the file pbcopy .ssh/id_ed25519.pub < ~/
  • create SSH key - go to settings - Access - SSH key
  • push to GitHub: git push -u origin main
  • git add -A
  • git commit -m "message"
  • git push origin main

2. Outline

Takeaway

  • 00:00 開場白 & Git 安裝
  • 02:03 Git 基本設定與初始化
  • 03:36 Git 檔案狀態
  • 06:46 檢視提交記錄與檔案還原
  • 10:06 忽略檔案清單
  • 10:34 GitHub 註冊 & 同步儲存庫
  • 12:11 加入協作者至專案
  • 13:36 建立分支
  • 14:35 發起合併請求 & 合併分支

My Note

  • Mac install git: xcode-select --install
  • check git version: git --version
  • set username and email: git config --global user.name "LauraHsu", git config --global user.email "[email protected]"
  • initialize: git init
  • check the status: git status
  • Status to know:tracked追蹤, untracked未追蹤, staged已暫存, committed已提交
  • tracked to untracked: git add .
  • green word means ready
  • commit: git commit -m
  • add all the file which is md: git add *.md
  • all the catalog: git log, q(to exit)
  • git online: git log --oneline
  • compare the version difference: git diff
  • confirm to change: git checkout
  • resume: git reset --hard
  • connect local to remote: git remote add origin (website)
  • branch: git branch -M main
  • push: git push
  • clone: git clone
  • change directory: cd
  • pulll: git pull
  • branch: git branch
  • checkout: git checkout

3. Outline

Takeaway


[Reference]

  1. Git and Github Basics for Every Developer
  2. 程式與網頁開發者必備技能!Git 和 GitHub 零基礎快速上手,輕鬆掌握版本控制的要訣!
  3. Git Tutorial: Learn How To Use Git in 23 Minutes!









[Reference]

  1. Git and Github Basics for Every Developer
    尋大神腳印, 亦步亦趨。
    留言0
    查看全部
    發表第一個留言支持創作者!
    什麼是constant variables?
    閱讀時間約 2 分鐘
    Laura 重點專案實作
    閱讀時間約 2 分鐘
    4.11 Twitter Dapp 02 Javascript
    閱讀時間約 17 分鐘
    React Hook - useContext
    閱讀時間約 1 分鐘
    React Forms
    閱讀時間約 1 分鐘
    React Hook
    閱讀時間約 1 分鐘
    你可能也想看
    Git & GitHub 學習筆記新手紀錄的 Git 學習筆記,將會隨著雷爆與淚水不定時更新
    Thumbnail
    avatar
    蕭宇廷
    2023-11-17
    git merge 衝突處理以前公司在對於 git 合併衝突的解法通常是將master合回自己的分支接著開發,也習慣了這種作法,但線圖就是有點醜,後來到了新公司之後規定強制要使用rebase的方式處理,在此紀錄git rebase 處理merge 衝突。
    avatar
    DDDDD
    2023-08-19
    Git & GitHub | 基本使用有關 git add, git commit, git push
    Thumbnail
    avatar
    Jeremy Ho
    2023-08-09
    Git | Unity 專案上傳 GitHub 流程這篇文章將會講解 Git 專案上傳 GitHub 的流程。
    Thumbnail
    avatar
    瓶裝雪
    2023-01-11
    Git | 分支的合併這篇文章將會介紹分支的合併,以及它常見的分類。
    Thumbnail
    avatar
    瓶裝雪
    2022-09-23
    Git | 雲端與個人的資料儲存和分支的建立前言   這篇文章將會以 SourceTree 作為媒介,講述 Git 中關於伺服器資料儲存狀態的介紹,並介紹如何建立分支與應用。 資料上傳 | Data Commit   版本控制最簡單的介紹,其實就是把專案的資料上傳雲端,然後進行不同版本的分類,當有需要抓回某一個功能進行展演或比對時,可以從這雲
    Thumbnail
    avatar
    瓶裝雪
    2022-09-21
    Git | 伺服器及客戶端選擇 前言   這篇文章將會介紹伺服器的概覽和倉庫,並介紹兩款客戶端協助使用者。 伺服器 | GitHub   線上軟體原始碼代管服務平台,使用 Git 作為版本控制軟體 GitHub 同時提供付費帳戶和免費帳戶,這兩種帳戶都可以建立公開或私有的代碼倉庫,但付費使用者擁有更多功能。   除了允許個人和組
    Thumbnail
    avatar
    瓶裝雪
    2022-09-19
    Git | 版本控制介紹前言   這篇文章將會介紹版本控制,並介紹相關的伺服器和客戶端,藉由比較易懂的方式介紹,可能會跟實際上有些微的落差,但會比較好理解。 版本控制   版本控制基本上是由一個名為 Git 的軟體所建立,隨著時間推進,延伸出了很多伺服器和可視話的客戶端,接下來我會一個一個介紹。 底層 | Git 客戶端
    Thumbnail
    avatar
    瓶裝雪
    2022-09-13
    git&github操作筆記、安裝git、下載github專案
    Thumbnail
    avatar
    匿名李
    2021-08-08
    Git 與 Github 是什麼?如何使用 Git?搞清楚 Git 與 GitHub 的差別並學會必會操作 什麼是 Git? Git 是一個軟體,可藉由它產生一個數據庫(repository),並且做到分散式版本控制。由於可在多處放置同一份程式碼、歷史紀錄追蹤與回朔,讓協同開發變得容易。(關於不同版本控制系統的介紹,請參閱 Git 官方教學文件)
    Thumbnail
    avatar
    Ray C
    2019-12-01