A couple of days ago I came across this excellent tip to download your GMail mail to your computer with IMAP. Before you continue reading here, I assume you read that article first. In this article, the path /path/to/gmail/backup is the path of the local repository, which you configured for offlineimap.
In the comments of that article, I stated that there's a problem with duplicate files. GMail has no real folders, but you can label e-mails. This implies that the same e-mail may possibly end up in more than one folder. When you download all folders, it is likely you store that e-mail multiple times.
Sometimes it's handy to checkout a branch based on a point in time.
will not work, because it uses the reflog (which expires after some time).
The trick (as found on Nabble) is to lookup the revision on a certain date and check out that revision. This can be done in a single command:
Those who use git frequently will often execute commands like git status and git branch to check which branch you're on and if there are pending changes.
Fortunately, git offers a Bash script which automatically shows the current state of your repository in your prompt.
Wie veelvuldig git gebruikt, zal vaak de commando's git status en/of git branch uitvoeren om te kijken in welke branch momenteel actief is en of er nog wijzigingen rondhangen die nog niet gecommit zijn.
Gelukkig komt er bij git een script mee voor Bash waarmee je dat automatisch in je prompt kan laten zien in wat voor toestand je repository zich begeeft.
Due to circumstances I had to look for a new way to backup my home directory. I was using rdiff-backup(1) before, but I wasn't completely satisfied with it. The overhead of incremental data was quite large, especially if you moved files around. But overall it does its job quite well.
However, since a year or so I'm quite charmed of Git, the stupid file content tracker. It's a great tool for software development, but due to its advantages over other VCSs it's also suitable for backing up structures like a user's home directory.
When trying to commit a change set, git gave the following error:
It seems that the hooks went broken somehow. Since I don't have any custom hooks, I moved the .git/hooks folder away and created an empty one. Committing to the repository works again.
It is a bit cumbersome to call git rm for every missing file in a directory tree tracked by Git. Fortunately, this following command will solve this problem instantly:
Note: this command works from the current working directory, not the root directory of the Git repository.
I wanted to check out a folder from the KDE Subversion repository as a git repository, so I used the git-svn tool to accomplish that. These were the steps I followed:
-
git svn init \
https://bram@svn.kde.org/home/kde/trunk/extragear/utils/rsibreak -
git svn fetch
But that didn't work out, I got the following error:
Doing a git clone/pull/push command might result in the following error message:
Password:
fatal: protocol error: bad line length character
fetch-pack from 'ssh://bram@xxx.xxx.xxx.xxx/home/bram/Filesystem' failed.