Clever Castle
174 words
1 minutes
Git 工作流
2021-04-07

Flow#

Git Flow#

Github Flow#

github flow

Gitlab Flow#

Rebase or Merge#

Diff#

How to Rebase#

pre-condition:

  1. current branch is feature/xxx
  2. try to rebase master
git rebase master 

Commit Format#

Angular Commit Format

<header>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
<type>(<scope>): <short summary>
│ │ │
│ │ └─⫸ Summary in present tense. Not capitalized. No period at the end.
│ │
│ └─⫸ Commit Scope: animations|bazel|benchpress|common|compiler|compiler-cli|core|
│ elements|forms|http|language-service|localize|platform-browser|
│ platform-browser-dynamic|platform-server|router|service-worker|
│ upgrade|zone.js|packaging|changelog|dev-infra|docs-infra|migrations|
│ ngcc|ve

└─⫸ Commit Type: build|ci|docs|feat|fix|perf|refactor|test

Must be one of the following:

  • build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
  • ci: Changes to our CI configuration files and scripts (example scopes: Circle, BrowserStack, SauceLabs)
  • docs: Documentation only changes
  • feat: A new feature
  • fix: A bug fix
  • perf: A code change that improves performance
  • refactor: A code change that neither fixes a bug nor adds a feature
  • test: Adding missing tests or correcting existing tests
  • chore: Other changes that don’t modify src or test files
  • revert: Reverts a previous commit

Scope may be one of the following:

  • wechat
  • group
  • compile
  • crud

How to roll back#

Revert or Reset#

Revert wil create one new commit to revert the commit in history tree. And Reset will delete the commit.

CodeStyle#

Git 工作流
https://blog.ivyxjc.com/posts/git-workflow/
Author
ivyxjc
Published at
2021-04-07