Category: Open Source

Git tutorial pushing branch

This is a very good and clear tutorial how to push a local branch to a remote with git.

In a nutshell:

1. Creating a the remote branch

git push origin origin:refs/heads/new_feature_name

2. Updating the branch list
git fetch origin

3. Just double check if it is really there
git branch -r

4. Track the remote branch on a new local one
git checkout --track -b new_feature_name origin/new_feature_name

5. Classic pull. All branches will be pulled now
git pull

Going back in the past with git

Sometimes you find yourself in a really big mess:

  • you made some modification that you want to disregard, but
  • you don’t want to delete everything you’ve done.
  • you messed up your master. Although you shouldn’t.

That’s why a git reset is not the way to go, however there is a really nice way to do it:

  • you choose the commit where you want to restart
  • you apply the merge with ‘theirs’ strategy, which actually copy the info from branch B (theirs) to branch A

This is the magic trick:

[code]git checkout -b fixing some_commit
git checkout master
git merge -s recursive –strategy-option theirs B[/code]

  1. Create a fixing branch from the right commit
  2. go back to master
  3. scrap everything you did and copy from the good old branch.

H/T darkhax

Diaspora in the wild

Today Diaspora is releasing its code. In short diaspora is a social network which takes the privacy of the users really seriously, given the possibility to control the information, the hosting and the way is delivered.

On top of that, contents created with Diapsora remains with the user and it’s not property of Diaspora.

The software is in still alpha mode, however I really like the idea and the vision of the developers.

As already noted several time, digital personal identity is something which should be taken more seriously and people should be more aware what that means, how to use it  and what they can do with that.

This is a moving target field, where things change rather quickly, so the dust is not yet set to understand what are the big innovations taking place.

I hope diaspora will make it big, and I hope it would be one of the gateway to make the net-citizen aware that their digital personal identity is important and should be protected.

One or two things you should know about the desire

Htc Desire - a Droid with power. A lot of power.

It works.

It works very well.

After upgrading to the latest Android system (2.2) and resetting the phone with a data connection (I’m on O2 bolts on for internet, 7.50 £ per monthe for 500 Mb) the phone works very well.

This morning I just transferred a Pdf file from my computer (which runs ubuntu 10.04.. I mean GNU/Linux …) to the phone using bluetooth.

Just start the service, making the pc and the phone discorevable and then it was done. No black magic.

Now I’m back home, one of my job failed at the cluster. (Read my mail on HDSPA.) My internet is down ’cause virgin is having troubles for two days, right now.

So I’ve just shared the connection from my phone and I’m using it to go online, submit the failed job after correcting the problem and writing this post.

I don’t know what do you think, but I think this is sweet 🙂

Back in time – Easy Backup solution for linux

Making the backup is always a tricky business for me.

I always tend to postpone the moment, and that’s not a very smart procedure to keep your data safe. Thankfully, from when I discovered backintime the situation is quite different.

Back in Time Screenshot

Back in time is just a really nice and friendly graphical interface on top of rsync. The good thing is that you don’t have to worry about rsync in any way. The interface has really neat default options, like get rid of your old backup if you are short in space.

After you’ve installed you just have to pick the directory where you want to save your backup and clcik “Take Snapshot”. Then you’re done. Quick and easy.

Lucid Lynx is pretty slick

I’ve just upgraded to Lucid Lynx. Pretty slick!


The upgrade worked out quite well and I was really surprised. My system usually runs a lot of beta/alpha softwares. One way to avoid any problem is to do a clean install. If you have all your data in your home and you have partitioned in a convenient way you can do it in a light heart way.

Unless you had to install tons of scientific softwares in /usr/local for some kind of reason.

It took me one day to get everything up to date, from to add the new slick indicator applet  to the panel, to check out the new stuff. (I gave a go to GNOME shell, but didn’t really get into it too much yet!)

gnome shell

If you just installed Lynx and don’t know what to do, check out this post.

How to set up a good partition scheme in Linux

It’s always a good idea to have at least two partitions, one for your O.S. and one for your data. There are a lot of programs which you can use to part your harddrive  (e.g.: [ gparted | qparted ]).

I’m pretty happy with my current schema, which I developed long time ago, when my harddrive was only 40 Gb. I wrote about this in this old post, which I’m translating from Italian to English.

This is a schema for an old laptop of 40 Gb, but you can extend the concept.

Harddisk: 40 Gb

/ 10 Gb (root, where you will install the operative system)

swap 1Gb (should be the same amount of RAM you’ve got if you want to suspend)

/home 29 Gb

The main idea is to create a 10Gb for your O.S., the swap for the RAM and then everything left should go as space for the home.

This is pretty good way to part your disk because:

  1. Your data are detached from the O.S., so you can clean your partition very quickly and put a shiny new one in no time.
  2. 10 Gb is maybe too many for the O.S., but I tend to install a huge amount of stuff and sometimes when writing big file you need space in tmp.

So far it works for me.

With my new (3 years old…) laptop I have this figures:

 

18.4 Gb for the root (/)

4 Gb for the swap

87.7 Gb for the /home

We don’t talk about GIL

GIL is the Global Interprer Lock for python

This video makes some really cool points.

Especially around the 3 minute. You can have a proper laugh 🙂

Interesting article about python parallelization

The first rule is we don’t talk about GIL.
The second rule is we don’t talk about GIL…