Monthly Archives: July 2013

Git: Staging Area aka “index”

  • Working Tree
  • Index / Stage / Staging Area / Cache
  • Repository

The Staging Area (also called the “index”) is where Git remembers which changes are marked to be committed. If a change is not “staged” it will not be committed. A change can be as granular as a single changed line in a file, leading to very precise commits. If, after staging a change, you decide you don’t want that change to go into the next commit, you can also “unstage” it.

Stage file: $ git add
Unstage file: $ git reset HEAD

Git Basics – Undoing Things

Removing untracked files from your git working copy
$ git clean -f

git-clean
Removing untracked files from your git working copy

Ubuntu: Add new PPA (Personal Package Archive) repository

PPA = Personal Package Archives
Repository = A collection of software you can download quickly and easily.

Personal Package Archives for everyone!

Add Repository

$ sudo add-apt-repository ppa:vala-team
$ sudo add-apt-repository ppa:irie/blender   ==>   https://launchpad.net/~irie/+archive/blender
$ sudo apt-get update
$ sudo apt-get install [...]

Remove Repository

$ sudo add-apt-repository --remove ppa:vala-team

How can PPAs be removed?

Show current version of package

$ apt-cache policy blender
blender:
  Installed: 2.66a-3ubuntu2
  Candidate: 2.70+git201403201745.dfa5ced-0irie1~saucy1
  Version table:
     2.70+git201403201745.dfa5ced-0irie1~saucy1 0
        500 http://ppa.launchpad.net/irie/blender/ubuntu/ saucy/main i386 Packages
 *** 2.66a-3ubuntu2 0
        500 http://mirror.switch.ch/ftp/mirror/ubuntu/ saucy/universe i386 Packages
        100 /var/lib/dpkg/status

How to check the version before install packages using apt-get
Check package version using apt-get/aptitude?