How-To

How to select “columnly”

  1. Holding key Shift and Alt, and then you can select “columnly”:

    ../_images/howToSelectColumnly_step1.png

How to rename

  1. Put cursor on the variable or function you want to rename and press key F2.
    (or right click on it, and then click item rename)
    Enter a new name and press key Enter
    ../_images/howToRename_step1.png
  2. Confirm the list and click button apply

    ../_images/howToRename_step2.png
  3. Do not forget to save those changes, if setting auto save is not enabled

How to diff

  • With command git diff

    1. Execute

      git diff <SHA1 ID of the commit you want to diff with>
      
  • With command git reset

    1. Execute

      git reset <SHA1 ID of the commit you want to diff with>
      
    2. Do not forget to reset back with

      git reset ORIG_HEAD
      

How to revert partially

  1. Open the “diff” view

    ../_images/howToRevertChangePartially_step1.png
  2. Choose the changes you want to revert, right click on them, and then click item revert the selected changes

    ../_images/howToRevertChangePartially_step2.png
  3. Do not forget to save those changes, if setting auto save is not enabled

How to get a simple history

  1. Execute

    gitk --all &
    
  2. Click item View and then click item Edit view… or Press F4 directly.

  3. Click item Simple history and then click button ok.

  4. Sure, the above steps can be replaced with the following command:

    gitk --all --simplify-by-decoration &
    

How to sync

  1. Fetch and prune

    git fetch --all
    git remote prune origin
    
  2. Checkout

    git checkout <the branch you want to synchronize>
    
  3. Three different situations may happen

    • If you want the remote only, execute

      git reset --hard origin/<the branch you want to synchronize>
      
    • If you want the “local” only, execute

      git push -f [origin <the branch you want to synchronize>]
      
    • If you want both of them, execute

      git pull --rebase
      

      or

      git rebase origin/<the branch you want to synchronize>
      

      Then fix conflicts with

      <edit>
      git add
      git rebase --continue
      

      or

      git rebase --skip
      

      Finally, push it with

      git push [origin <the branch you want to synchronize>]
      

How to make a “shortcut”

To Be Added