From 67ff41a1f0b4139ec5912a86a5bc5ecbe17f1418 Mon Sep 17 00:00:00 2001 From: framedstone Date: Thu, 5 Feb 2026 07:34:42 +0800 Subject: [PATCH 1/2] feature(zshrc): alias & gh cli --- .zshrc | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .zshrc diff --git a/.zshrc b/.zshrc new file mode 100644 index 0000000..e54b1c0 --- /dev/null +++ b/.zshrc @@ -0,0 +1,45 @@ +# git +alias gc="git commit" +alias gs="git status" +alias gS="git switch" +alias gP="git push" +alias gp="git pull" +alias gf="git fetch" +alias gco="git checkout" +alias gm="git merge" +alias gt="git tag" +alias gl="git log" +alias gw="git worktree" + +# git flow +alias gflw="git flow" +alias gflwi="git flow init" +alias gflwfs="git flow feature start" +alias gflwrs="git flow release start" +alias gflwhs="git flow hotfix start" +alias gflwbs="git flow bugfix start" + +# integrate with github cli to create pr +function gflwpr() { + case "$1" in + feature) + gh pr create --base develop + ;; + bugfix) + gh pr create --base develop + ;; + refactor) + gh pr create --base develop + ;; + release) + gh pr create --base main + ;; + hotfix) + gh pr create --base main + ;; + *) + echo "Usage: gflwpr {feature|release|refactor|hotfix|bugfix}" + ;; + esac +} + From 27191ffe2124cd607578836aeb04279d81fc1045 Mon Sep 17 00:00:00 2001 From: framedstone Date: Thu, 5 Feb 2026 07:55:00 +0800 Subject: [PATCH 2/2] chore: README.md --- README.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..601d3e8 --- /dev/null +++ b/README.md @@ -0,0 +1,38 @@ +# Git-flow with github actions CI/CD + +### What's the difference + +The `git-flow` workflow is made for _personal-usage_, hence adding CI/CD transform the same branching workflow convention to match with standard Pull Request workflows using github cli. + +### Installation + +##### git-flow + +Windows - [Git for Windows](https://gitforwindows.org/) +MacOS - `brew install git-flow` +Linux - e.g. `sudo apt install git-flow` (based on your package manager) + +##### github cli + +Windows - e.g. `winget install GitHub.CLI` (based on your package manager) +MacOS - `brew install gh` +Linux - e.g. `sudo apt install github-cli` (based on your package manager) + +### Setup + +1. Run `git flow init` in your repository and complete the setup +2. Run `gh auth login` and complete the auth +3. Modify/Append [.zshrc](./.zshrc) tailored to your setup (optional) + +### How to start using + +1. Run `git flow (branch) start (name_of_the_branch)` + 1.5 Do `git checkout -b` for `refactor` branch (optional) +2. **DO NOT** complete with `git flow (branch) finish (name_of_the_branch)`, instead do `gh pr create --base (branch - follow git-flow convention)` +3. Follow the `gh cli` to complete the PR process +4. You should now see the branch getting _merged_ and _deleted_ + +### Reference + +- [git-flow official documentation](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow) +- [github actions plan limits](https://docs.github.com/en/actions/reference/limits)