blog.plee.me About software, technology and random things

23Nov/140

Using msysgit With PuTTY Pageant & Plink

Hi!

If you have installed msysgit and are planning on using it in combination with Pageant from the PuTTY tool suite, you might run into the problem that it does not attempt to use any of the keys you have already loaded into Pageant. You can fix this by telling msysgit which program to use for the git fetch and pull operations:

  • Open your System window (Windows + Pause or "Start" => Right-click on "Computer" => "Properties")
  • Click on "Advanced system settings" (on the left)
  • Click on "Environment Variables..." (on the bottom)
  • Add a new system variable (or user variable if you just want this setting for the current user): "New..."
  • Variable name: GIT_SSH
    Variable value: (path to plink.exe) for example: C:\Program Files (x86)\PuTTY\plink.exe (important: just the path, no quotation marks at the beginning or the end!)
  • If you haven't already on this system / user, connect to the server via PuTTY in order to get the SSH server fingerprint prompt and remember it
  • Close any existing Git Bash / msysgit instances and start it up again

This should do it!

I hope this was helpful.

Thanks for reading!

Source: http://www.bitsandpix.com/entry/git-setup-msysgit-install-with-pageantplink-from-putty/

9Nov/140

Deleting Huge Directories in Windows Via Command Prompt

Hi!

If you'd like to delete a huge folder / directory in Windows with maybe thousands or hundreds of thousands of files inside, doing that via Explorer might cost you a lot more time than via command prompt.

Here's how to do it faster:

  1. Open the command prompt by using "Start" => "cmd" and navigating to the desired path via "cd <path>" or "pushd <path>"
    - OR -
    navigate to the folder in the Explorer and use Shift + right-click and "Open command window here"
    (Note: if deleting the desired folder requires elevated privileges, you will have to start a command prompt in elevated mode and navigate the old-fashioned way)
  2. Use the following command:
    rmdir /s /q folder

A little explanation about rmdir's flags:

  • /s: removes the directory itself including all the contained files and subdirectories
  • /q: forces deletion and does not ask for approval

Doing this can be very helpful in a coding environment where you can easily end up with thousands of small files.

Thanks for reading!

Source: https://stackoverflow.com/questions/186737/whats-the-fastest-way-to-delete-a-large-folder-in-windows