Giter VIP home page Giter VIP logo

lzwaizl.github.io's People

Contributors

lzwaizl avatar

Stargazers

 avatar

Watchers

 avatar  avatar

lzwaizl.github.io's Issues

git 工作流记录

开发仓库:[email protected]:tinfinite/xxoo.git

个人仓库:[email protected]:user/xxoo.git

step1: Fork仓库,克隆仓库,切换到 develop 分支

# fork 开发仓库 (eg: [email protected]:user/xxoo.git)
git clone [email protected]:user/xxoo.git                 ## 克隆 fork 的仓库
git remote add xxoo [email protected]:tinfinite/xxoo.git  ## 添加开发仓库的源 (可使用git remote -v 查看)
git fetch xxoo                                         ## 获取远程开发仓库的分支和提交
git checkout -b develop xxoo/develop                   ## 拉取远程开发仓库源的 develop 分支
git push -u origin develop                             ## 推送到远程

step2: feature 分支开发

git checkout -b some-feature develop                   ## 创建feature分支
# coding
git add .
git commit -m "feature description"
git push -u origin some-feature                        ## 推送到远程

step3: 合并远程开发仓库,及feature分支到本地develop,并推送到远程

git checkout develop                                   ## 切回 develop 分支
git pull xxoo develop                                 ## 将开发仓库 develop 分支合并到本地 develop 分支
git merge some-feature                                 ## 将本地 feature 分支合并到本地 develop 分支
git push origin develop                                ## 推送到远程
git push origin --delete some-feature                  ## 删除远程 feature 分支
git fetch -p                                           ## 删除不存在对应远程分支的本地分支(删除本地 feature 分支)

step4: pull request (web上操作)


step5: review request, merge, prepare a release

git pull origin develop
git checkout -b release-x.y.z develop                  ##  clean up the release, test everything, update the documentation, and do any other kind of preparation for the upcoming release

step6: finishes the release, push tag

git checkout master
git merge release-x.y.z
git push

git checkout develop
git merge release-x.y.z
git push

git branch -d release-x.y.z
git tag -a x.y.z -m "some desc" master
git push --tags

step7: hot fix

# writing bug in issues
git checkout -b issue-#001 master
# Fix the bug
git checkout master
git merge issue-#001
git push

git checkout develop
git merge issue-#001
git push
git branch -d issue-#001

工具:Commitizen & validate-commit-msg

  1. Commitizen是一个撰写合格 Commit message 的工具。
  2. validate-commit-msg 用于检查 Node 项目的 Commit message 是否符合格式。

规范:合并多个commit

多次修改会产生多次commit,合并使其整洁~


参考:

git flow: https://www.atlassian.com/pt/git/workflows#!workflow-gitflow

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.