π git
tips about git cli
Use branch name
create branch named `hotfix/issue-<name-id>-anything`
, after it merged will automatic close issue namd `name-id`
in linear side.
e.g. `hotfix/issue-<jwx-159>-anything`
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 }}
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>"
- Delete the tag on any remote before you push
`git push origin :refs/tags/<tagname>`
- Replace the tag to reference the most recent commit
`git tag -fa <tagname>`
- 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.
in `~/.gitconfig`
[https]
sslBackend = openssl
proxy = socks5://127.0.0.1:1086