1. checkout 远端开发branch到本地,
git checkout -b local_dev_branch origin/dev
2. 本地修改代码, 然后提交代码, 例如如下提交java文件.
git commit -m *.java "modified java files"
3. 本地修改后, 提交代码到远端, 远端的branch名可与本地相同,等待review, local_dev_branch_for_remote 就是远端branch名
git push origin local_dev_branch:local_dev_branch_for_remote
4. 当review后需要继续修改,重复步骤 2-3, reviewed通过merge到dev branch后, 可以删除远端branch
git push --delete origin local_dev_branch_for_remote
5.然后删除本地branch
# change to other branch before delete git checkout other_local_branch # delete git branch -D local_dev_branch