Posts for ellak

Single backup repo with git

Well as Linus says, with git he doesn't do backups, and it's true that dvcs partially solve the backup problem as long as someone has cloned your repo.

For those branches that are not published yet you have to take backups. Instead of setting up a backup repo for every project you could use a single one for all of them! Every project will have it's own prefix so the namespace stays consistent.

mkdir ~/backup
cd ~/backup
git --bare init

cd projectA
git remote add backup ~/backup
# You probably don't want to fetch from this repo
git config remote.backup.fetch ''
# Push branches to a project namespace
git config remote.backup.push '+refs/heads/*:refs/heads/projectA/*'

git push backup

If you want to track the backup branches you can do it with the following fetch refspec:

git config remote.backup.fetch '+refs/heads/projectA/*:refs/remotes/backup/*'

Αναβάθμιση wordpress με git

Ανάμεσα στα άλλα κάνω maintain το wordpress blog που έχουμε στο Ιδεόπολις. O κώδικας του blog έχει το δικό του branch μέσα στο git αποθετήριο του wordpress.

Αυτό πρακτικά σημαίνει ότι κάθε αναβάθμιση (όπως η τελευταία security release 2.6.5) είναι μόνο τρεις εντολές:

     $ git fetch origin
     $ git checkout my_blog
     $ git rebase 2.6.5 (non-conflicting)