GitHub iconTwitter icon

๐Ÿ™ git

tips about git cli

git commit --amend --author="Author Name <email@address.com>" --no-edit

after that, change entire project commit.

git rebase -r --root --exec "git commit --amend --no-edit --reset-author"

`Author Name <email@address.com>` is newer author info.

refs: https://stackoverflow.com/questions/750172/how-do-i-change-the-author-and-committer-name-email-for-multiple-commits

`permissions` is required Check https://github.com/{repo}/settings/actions Workflow permissions with `Allow github actions create and approve pull request` & `Read & Write permissons`.

name: Release
on:
  push:
    branches:
      - main
      - master
      - 'releases/*'
env:
  CI: true
jobs:
  version:
    timeout-minutes: 15
    runs-on: ubuntu-latest
    permissions:
      id-token: write
      contents: write
      packages: write
      pull-requests: write
      issues: read
    steps:
      - name: checkout code repository
        uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - name: setup node.js
        uses: actions/setup-node@v2
        with:
          node-version: 14
      - name: install pnpm
        run: npm i pnpm@7.23.0 -g
      - name: install dependencies
        run: pnpm install --frozen-lockfile=false
      - name: create and publish versions
        uses: changesets/action@master
        with:
          version: pnpm ci:version
          commit: "chore: update versions"
          title: "chore: update versions"
          publish: pnpm ci:publish
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

`ln -s ./packages/core/CHANGELOG.md CHANGELOG.md`

config

git config --global user.name "<username>"
git config --global user.email "<email>"

ssh

ssh-keygen -t rsa -C "<email>"

add `id_rsa.pub` to personal-ssh-key on github.com

config for repo

git config user.name "<username>"
git config user.email "<email>"
  1. Delete the tag on any remote before you push

`git push origin :refs/tags/<tagname>`

  1. Replace the tag to reference the most recent commit

`git tag -fa <tagname>`

  1. Push the tag to the remote origin

`git push origin master --tags`

`git tag` see all tags

git tag -d <tag-name>

remove remote tag

git tag --delete origin <tag-name>

tag-name and branch-name should not duplicate

{
  "config": {
    "commitizen": {
      "path": "node_modules/cz-emoji"
    }
  }
}

Specify cz-emoji local path.

commit message contain `close #<issue-number>`

in `~/.gitconfig`

[https]
	sslBackend = openssl
	proxy = socks5://127.0.0.1:1086

https://jasonet.co/posts/scheduled-actions/

  1. scheduled action ้ป˜่ฎคๅชๅœจ`master`ๅˆ†ๆ”ฏๅทฅไฝœ๏ผŒๅฆ‚ๆžœๆƒณ่ฆๅœจๅ…ถไป–ๅˆ†ๆ”ฏ่ตทไฝœ็”จ๏ผŒๅฏ้…ๅˆ`actions/checkout`ๅฎž็Žฐ