I work with git on a lot of different systems - Mac, Windows, Linux, personal, corporate or client specific hardware. When I don't have my git aliases available, I miss them. When I update my aliases, I want it to be easily replicated across all these systems. This is my method of synchronising my git aliases, and most likely other git configuration items, across the multiple environments I work with.
- Install the cloud drive and sign-in to sync my files.
- Add the below [Include] section to my global .gitconfig, pointing to the .gitconfig-alias file in the cloud drive. Remember, the global .gitconfig should be in my home folder i.e cd ~
- Clone this repo the desired location on the system I am working on.
- Add the below [Include] section to my global .gitconfig, pointing to the .gitconfig-alias file in the cloned repo.
[include]
path = "~///repos//gitconfigs//.gitconfig-alias"
[include]
path = "\\\\Mac\\Dropbox\\GitConfigs\\.gitconfig-alias"