基本操作

  1. git status
  2. git add .
  3. git status
  4. git commit -m "feat: 添加一个新特性"
  5. git push

Commit Message Guidelines

angular提交规范

  1. <type>(<scope>): <subject>

Type

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: Travis, 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
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
  • test: Adding missing tests or correcting existing tests

    效率技巧

使用以下命令,能够缓存Git仓库和密码,输入一次账号密码之后,后续操作就不需要再次输入了,能大大提高效率。

  1. git config --global credential.helper store

Git的用户设置配置都存储在本地用户的 .gitconfig文件中

  1. .gitconfig

Pull Request操作

Github加速

使用github的镜像网站进行访问,github.com.cnpmjs.org,我们将原本的网站中的github.com 进行替换。