git相关工具的安装和使用,如 Git Bash,GitDesktop等。

二、git 工具

01 Git Desktop

02 Git Bash

Git Bash 是一个在 Windows 系统上模拟 Linux 环境的命令行界面,是一个完整的命令行环境,可以像普通的Unix或Linux终端一样执行各种命令。

1. Git Bash修改默认打开之后的路径

https://blog.csdn.net/zzfenglin/article/details/54646541

03 git flow

git flow is a branch manage tool to help team manage and realease program better. Use command below to install it on ubuntu.

sudo apt-get install git-flow
  1. master: 永远保持稳定和可发布的状态
  2. develop: 用于集成所有的开发分支; 代表了最新的开发进度; 功能分支、发布分支和修复分支都从这里分支出去,最终合并回这里
  3. feature: 用于开发新功能; 从 develop 分支创建,开发完成后合并回 develop 分支; 命名规范 feature/feature-name
  4. release: 用于准备新版本的发布; 从 develop 分支创建,进行最后的测试和修复,然后合并回 develop 和 master 分支,并打上版本标签; 命名规范release/release-name
  5. hotfix: 用于修复紧急问题; 从 master 分支创建,修复完成后合并回 master 和 develop 分支,并打上版本标签; 命名规范hotfix/hotfix-name

work flow

git flow init

# 开发新功能
git flow feature start new-feature 
git flow feature finish new-feature

# 测试和修复
git flow release start v1.0.0 
git flow release finish v1.0.0

# 修复紧急问题
git flow hotfix start hotfix-1.0.1.
git flow hotfix finish hotfix-1.0.1

04 git emoji

Emoji Code Usage
🎉 :tada: Initial commit or celebration.
:sparkles: Introducing a new feature.
🐛 :bug: Fixing a bug.
🔥 :fire: Removing code or files.
📝 :memo: Writing docs or updating comments.
🚑 :ambulance: Quick fix (hotfix).
♻️ :recycle: Refactoring code.
🔨 :hammer: Developing or modifying tools.
🚀 :rocket: Performance improvements.
:white_check_mark: Adding tests.
📦 :package: Adding or updating dependencies.
💄 :lipstick: Improving UI or cosmetic changes.
🐎 :racehorse: Improving performance.
🔧 :wrench: Modifying configurations.
🌟 :star: Improving existing functionality.
⚙️ :gear: Configuration-related changes.
🚚 :truck: Moving or renaming files.
🔒 :lock: Fixing security issues.
🗑️ :wastebasket: Removing deprecated code.

五、Q&A