poniedziałek, 12 maja 2014

Apply gitignore to existing Git repository


We have existing git repository which contains e.g. .net projects written in C# and we want to apply gitignore rules.

At the beginning we need to crate our own ignore rules or download predefined from https://github.com/github/gitignore.
In this case I prefer download predefined file: VisualStudio.gitignore and put in my existing git repository.

Don't forget commit all pending changes. After that run below commands

git rm -r --cached .
Below command removes everything from the index
git add .
git commit -m ".gitignore is now working"

sobota, 3 maja 2014

How to extend VirtualBox partition - Windows XP example

The Problem

Due to insufficient free space in my one of my Virtual Machines running under Windows XP I would like to extend existing disk image.
I originally created a 10GB virtual disk image, but soon realized that it isn't enough space.

The solution

1. Extend disk image using VBoxManage

Open command line (under windows 8 without Administrator privileges) and run command:

VBoxManage modifyhd Windows XP.vdi --resize 20480

  • Windows XP.vdi is the name of disk image file
  • 20480 new size in MB (in this case 20 GB)

2. Extend the NTFS partition

Although we extended the physical disk image, Windows XP still shows it's partition as 10GB.
We need to extend the NTFS partition into the new size.
To achieve that I downloaded the free GParted Live CD ISO image and attached it to my virtual machine.
Restart VM and set up new size.

2. Reboot Windows

Close VM and remove the ISO image from the Storage menu.
Start VM again and now Windows XP is starting up with check disk.
I got no errors message and Windows correctly recognizes new bigger partition.