Tuesday, March 29, 2011

Install Firefox 4 in Ubuntu

Firefox 4 is available for Ubuntu 10.04 and 10.10. To install it use the following commands

sudo add-apt-repository ppa:mozillateam/firefox-stable
sudo apt-get update
sudo apt-get upgrade

This will update your Firefox to version 4. Note that this will not install Firefox 4 side by side with your previous version as used to be the case with beta versions. As this installs the stable release version of Firefox so your previous version will be removed and after installation you will only have Firefox 4.0.

Tuesday, March 1, 2011

git bare repos

A normal git repository is a directory that contains:
  1. Our files: Files and directories that we have created and which contain our data. These files and directories are collectively known as working tree.
  2. .git directory: This folder contains all of the Git's control files.
A bare git repository does not have working tree and it also does not have .git directory either. All of the Git's control and management files are present in the directory directly. You can not checkout from a bare repository or commit to it.

So what are they useful for when you cant checkout or commit to them?

Bare Git repos are good for pushing and pulling only and they are designed this way so that they can be used as common shared repo by a group of people. So any one want to make changes makes a clone of that bare repo, makes changes in that cloned repo, commit them there and then push the changes to bare repo. Now any one wanting those changes can pull them from the bare repo.

To create and initialize a new bare git repo you can use the command:
git --bare init
and to clone an existing repo as a bare repo use:
git clone --bare