Dotfiles are all these files that usually start by . and let you configure many applications behaviour such as vim and git.
When you work on different computer you start missing your vimrc, bashrc, etc. This is when you start copying your files from one computer to another. That’s sooooo annoying… rsync, scpyou get tired of that very soon but there is a solution: git
Syncing with git
That’s right, git is the perfect tool as we’re manipulating text all the time and we can perform upgrades to our dotfiles from anywhere with some git push and git pull or gp and gl if you like aliases :P
These are the steps I did to have my dotfiles working. I got inspired by someone else but I don’t remember his name so I cannot give him credit :/ 1. Create a directory (you can do it with git so you already have the repo created aswell) 2. Copy your dotfiles to it without the . in front of it 3. Create an installation script adapted to your dotfiles. This is the harder step, depending on what you want to sync your script will be longer. Usually yoru script should always do a security copy of every file you are going to replace and then create symbolic links with ln -s to point to your files. Here is my install.sh script. It downloads zsh and oh-my-zsh, which I really recommend :P
Create an installation script adapted to your dotfiles. This is the harder step, depending on what you want to sync your script will be longer. Usually yoru script should always do a security copy of every file you are going to replace and then create symbolic links with ln -s to point to your files. Here is my install.sh script. It downloads zsh and oh-my-zsh, which I really recommend :P
Warning! This version may change in future to check the current version go here
Then push it to a remote repo and Profit :D!
Now everytime you do some modification you just have to push it and you will be able to pull it from another computer.