Git

Run Python on Github …

前言 記下 Github Action 執行 Python 程式 Example name: run script.py on: issue: - labeled jobs: build: runs-on: ubuntu-latest steps: - name: checkout repo content uses: actions/checkout@v2 - name: setup python uses: actions/setup-python@v4 with: python-version: '3.10' - name: install python packages …

[Note] Merge error in …

前言 使用 Github Action 來執行 git merge 指令時,出現如下錯誤: fatal: refusing to merge unrelated histories Solution 原因出在 actions/checkout@v2 的 fetch-depth v2 的 fetch-depth 預設為 1 需要設為 0 或將 --unshallow 新增至 fetch 指令 git fetch --unshallow My Github Action name: Merge branch on: issues: types: - closed jobs: …

[Note] Git 使用

此內容由 Notion 編輯並經由 Notion API 自動轉成 Hugo 頁面 The content write by Notion, and use Notion API convert to Hugo page. 基本設定 查看設定、設定帳號 git config --list git config --global user.name "XXX" git config --global user.email "XXXXXX@XXX.XXX" 移除設定 git config --global --unset user.name git config …