174 words
1 minutes
Git 工作流
Flow
Git Flow
Github Flow
Gitlab Flow
Rebase or Merge
Diff
How to Rebase
pre-condition:
- current branch is feature/xxx
- try to rebase master
git rebase master
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:
- 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.