Thursday, August 20, 2015

How to resize a VDI disk in VirtualBox

  1. Shutdown the virtual machine where you want to resize the virtual disk
  2. Open Oracle VM VirtualBox Manager
  3. Highlight the virtual machine where you want to resize the virtual disk
  4. Click the Settings ribbon bar button
  5. In the virtual machine settings window, click Storage at the left bar menu
  6. In the Storage Tree section, highlight the virtual disk that you want to resize
  7. In the Information section, right-click the file path after Location:
  8. Click Copy
  9. Open the Command Prompt (Windows)/Terminal (Linux)
  10. Type the following command

    vboxmanage modifyhd {location-path} --resize {size}
{location-path} is the virtual disk location that you copied in step 8
{size} is the new virtual disk size in megabytes (for example: 1 Gb = 1024 Mb)

Example:

I want to resize my virtual disk to 100 Gb:

vboxmanage modifyhd "H:\VMs\Guest#1.vdi" --resize 102400

Thursday, August 13, 2015

How to overwriting local changes in GIT using Sourcetree


  1. Open Sourcetree
  2. Open repository 
  3. At the ribbon bar, click Terminal


  4. At the terminal window, type the following commands:

    git fetch --all
    git reset --hard {remote branch} (example: origin/master)
    git pull origin master