Skip to main content

Ubuntu: rSync without git subdirectory

Ubuntu: rSync without git subdirectory
Previously I blogged about a good backup/sync tool rSync.

While using it, I faced some problems. It replaced my .git repository and there by affected my git repo settings.
I found a way to exclude sync'ing some files/folders. For this we have to use --exclude option. To exclude git sub-directory:
rsync -a --exclude='.git/'
 And to include some specific files, (Eg: 'c' files)
rsync -a --include='*.c/'

Source

Comments

Popular posts from this blog

OS X 10.8 Mountain Lion bootable USB (without MAC)

Download the raw file from here . How to use: 1 - Copy the .raw file to an USB stick using  SUSE Studio Image Writer . If you have error during copy, eject and re-connect the pen drive. When Windows asks if you want to format it, cancel and run Image Writer again. If the problem persists, disable your anti-virus software, it may be blocking raw write to the drive. Another Image Writer for Windows, if SUSE doesn't work https://launchpad.net/win32-image-writer/+download 2 - Boot the USB drive and install. If you need, type  boot options , for example: -v (verbose boot) [default] -x (safe) -s (single user) GraphicsEnabler=yes (enable graphics card drivers) [default] USBBusFix=yes (fix problems with USB devices) npci=0x2000 (use if boot stops at "PCI configuration begin") cpus=1 If you need, use  TransMac  to remove kexts which are causing problems (System/Library/Extensions) and use the flag -f (ignore caches) at boot, or remove /System/Libra...

Java: Use BigInteger in for-loop

In my previous post , I mentioned a way to handle large integers by using BigInteger. Now I'm going to provide a very important usage of it. We often use for-loop. So here is the way to use it: Ordinary integers: for(int i = 1; i <= n; i++) {  //Task to do } BigInteger: for (BigInteger bi = BigInteger.valueOf(1);                 bi.compareTo(n) <= 0;                 bi = bi.add(BigInteger.ONE)) { //Task to do } here n is a BigInteger variable.

Mac OSX Yosemite : Good, bad and Ugly

I can’t start my review with some statement like “yet another operating system”. Because it is still the same with some differences. I will start with my journey so far with Yosemite. Sometime back when I saw the preview images, it was like WOW. Are they transforming the Mac into iPhone/iPad? Wait, does it look familiar? Is it somewhat like Material Design of Android? Never mind, what we need is a clean and powerful OS. Mac is already clean and Yosemite seemed much cleaner. Fingers-crossed and waited for official launch. Finally my AppStore said, here is a powerful OS for you, that too for FREE. Lets talk about this FREE tag later. Just remind me if I missed it. It took some time to install (almost an hour after downloading. Pre- and post-installation….). Warning : What follows is strictly my opinion. When I looked at the lock screen for my first boot, I literally shouted WOW. It seems like I’m on an iPad. With no delay I logged into my PC and that’s it. Now my expression...