1. Create repository
    1. git svn clone -s <svn-url> <local-dir>
  2. Update
    1. git svn fetch
    2. git svn rebase
  3. Branching
    1. git branch -a
    2. git branch -r
    3. git checkout -b <new_branch> <base_branch>
    4. git checkout <working_branch>
  4. svn branching
    1. git checkout <branch-base>
    2. git svn branch -m "message" <new branch>
    3. git branch -r -d <branch-to-be-deleted>
  5. Temporary changes
    1. git stash
    2. git stash apply <index>
  6. Undo changes
    1. git reset --hard
    2. git checkout <checkin-branch> <file to be restored>
  7. Local commit
    1. git commit -a
    2. git commit -a --amend (merge into previous commit)
    3. git rebase -i HEAD~<num> 1. pick the first one 2. change others to be "squash" 3. edit log in another window
  8. Merging
    1. git diff <checkin-branch> <working-branch>
    2. git checkout <checkin-branch>
    3. git merge <working_branch> --squash
    4. only merge a target commit: cherry/cherry-pick
  9. Publish to SVN
    1. git svn rebase
    2. git svn info
    3. git svn dcommit -n
    4. git diff-tree <> -u
    5. git svn dcommit -e
    6. Check changes first
    7. Get remote changes
  10. reviewboard (post-review)
    1. post-review [-r <review-id>] --username=zhouh1 --password=password
    2. --guess-description --guess-summary (reuse git commit log)
    3. --parent=<remote-branch> (generate svn diff to upload)
    4. -n (to check changes)
  11. References
    1. Github Learning
    2. Git casts