User:Wctaiwan/Gerrit workflow

git clone ssh://wctaiwan@gerrit.wikimedia.org:29418/mediawiki/extensions/Flow.git cd ./Flow git review -s                             # set up git-review git checkout -b BRANCH_NAME origin/master # create a new branch; necessary for rebasing


 * 1) make changes and commit as necessary

git log                                   # find the commit immediately before the branch was created git reset --soft                 # move branch head to the beginning; all changes now appear as changes to be committed # git reset HEAD@{1} to undo ('HEAD@{1}' in PowerShell) git commit                                # squash all commits into one git pull origin master                    # sync the local master with the remote master git rebase master                         # set aside changes on branch, apply changes to master since branching, and then reapply # changes made on branch--this effectively creates a patch for the master branch git review -R                             # push the change set to Gerrit

is used to switch to a different branch.