Skip to content

Latest commit

 

History

History
35 lines (22 loc) · 1.05 KB

git最佳实践.md

File metadata and controls

35 lines (22 loc) · 1.05 KB

1. 尽量使用命令行

2. 写好每一条Commit Message

cm

3. 用好gitignore

如果仓库中已经有 git rm -f hello.out 然后再gitignore中添加

4. 基于分支或者fork的开发模式

开发使用好分支

5. 用好release分支和tag

常用tag版本规划 tag版本

6.修改最后一次commit message

git commit --amend
git push origin master --force

如果代码已经被别人拉取不能用 上面方法

git reset 也会提交新的历史

解决方法,新建一个跟人的dev分支 git branch dev git checkout dev
Git 使用规范流程

常用git命令清单

git工作流程