Some best practices for the Git
来源:互联网 发布:dbaccess declare sql 编辑:程序博客网 时间:2024/05/20 19:18
Git best practices:
- Do read about git
- Always keep develop branch clean
- Always sync the develop branch (This can avoid lots of conflicts when try to dcommit to remote repository).
- Don’t write any code directly in develop branch (The develop branch is not used to design any new functionality, it is used to sync with the remote repository. Each functionality should only be carried on the feature branch.)
- Using git flow to create feature branch for each function development (Git flow has supplied a branching model and a set of convenience commands according to the branching model).
- Docommit early and often in the feature branch (The code will be protected by theGit in the local repository).
- Small, logical commits (Easy to track each commit’s modification).
- Always review code before committing it
- Using eg squash to merge all the small commits to one commit (That will make each commit in SVN to be a full functionality commit, and the history of the commits in SVN will not be fragmented).
- Make all the commits to the SVN as a full functionality commit.
- Make your Git sandbox your own (Some unfamiliar commands in Git should be tested in the sandbox first before executed in the development environment).
- Do experiment, keep the trouble away from you
- KISS -- Keep it simple and stupid
- Do not use reset (--hard || -merge) without committing/stashing (Otherwise, the modification will be lost forever).
- Do not rewrite public history: you can’t do it in git-svn. Lucky!!!
- Do remember to call “git stash” when try to start a new feature branch.
- Do remember to apply which stash in the feature branch where it saved.
Those practices are abstracted from the practices from git-svn in a real project, but lots of the practices are still applied for the git-git workflow.
0 0
- Some best practices for the Git
- Some Best Practices for Silverlight Application Development (XAML)
- Android Development — Some of the best practices
- Best practices for the logging REST API
- Best Practices for WOW64
- Best Practices for Performance
- Best Practices for Performance
- Best Practices for Creating DLLs
- Best Practices for Exception Handling
- Best Practices for Exception Handling
- Best Practices for Exception Handling
- Best Practices for Creating DLLs
- Best practices for playing tennis
- Best Practices for Exception Handling
- Best Practices for Exception Handling
- Best Practices for Enterprise Security
- Best Practices for .NET enums.
- Best Practices for .NET events
- VC文件指针操作
- Android-MediaPalyer
- 多屏幕适配
- JavaScript笔记(数字,字符串,布尔互转)
- DriverManager.getConnection Class.forName 详解
- Some best practices for the Git
- Java学习笔记之文件的复制
- ubuntu下安装windows
- c++接口定义及实现举例
- U-Boot-2010-03在S3C2440上的移植
- 域名合法判断
- 明升与电脑
- js关于propotype的一些事-------Day62
- ios animation的暂停pause、恢复resume