This post will explain how to use git and GitHub to sync Lightroom presets across multiple machines.
So this has always been a big issue for Kelly and I, we both love to edit (and we both have to cull?) so that means we both have to use Lightroom. We are also natural born tweakers, so we are constantly modifying our presets and brushes, and adding new ones to create new effects and looks. This introduces an issue, how do we keep the look of the images we are both touching consistent.
In the past we have accomplished this by manually copying the folders between our two computers, but this was fraught with problems. What happens when we both modify the same preset, or Kelly modifies a preset and I modify a brush? How do you merge those changes. Enter version control.
Describing version control systems and the plus and minus of each are definitely outside the scope of this post, but here is a brief description to help you understand their usefulness. Version control systems were originally designed to help teams of software developers to be able to modify the source code for programs at the same time, from different machines and then merge those changes into one master history of each change. A simpler example would be editing a book. Imagine if you were asked to edit a book at the same time the author was writing it? That would incredibly difficult! Version control makes that not only possible, but really kind of easy. The other thing to notice is that in both of these examples we are talking about text files (did you know your light room presents are just text files you can open with TextEdit!! A topic for another post?).
Here is a really nice intro to Git and Version control: Version Control with Git [Git Basics]. If you are new to git, you should definitely play around with it using text files so you can understand the workflow. The GitHub Guide has a good intro to learning how git works.
For this example we will use the version control system called “git.” Git is far away one of the most widely used and powerful version control systems available today. It is totally overkill for what we will use it for, but its extremely well documented, so if you run into issues, you should be able to find a solution or someone to help you because of git’s popularity.
Here are the setup steps. Also, FYI, absolutely none of this is for the faint of heart, so make sure to take your time and definitely read some tutorials (like the one above) about using git.
Setting Up The Repository
The “repository” is the master record of your Lightroom folders. It contains the merged changes from each user’s machine and it exists on a remote server, in the cloud, on your Github account. It also contains the history of every change you ever made and pushed to the repository. If you realize you’re not happy with how your black and whites are coming out and want to go back to the way the preset was 6 months ago, you can do that!! If you and someone else on your team have modified the same preset and you realize you want to merge both their changes and yours, you can do that too!
- Create a Github Account: wikihow // youtube
- Create the Git Repository for your Lightroom files to reside in. Github documentation
- Log in to your GitHub account.
- In the upper-right corner of any page, click +, and then click New repository.
- Create a short, memorable name for your repository. For example, “hello-world”.
- Choose to create a public repository.
Note: One thing to realize here is that unless you pay for a private repository, others will be able to search for it and find it. So if you call it “Lightroom presets” then I could search for Lightroom and find your repository. Personally, we don’t mind this, but wanted to give you notice. - Click Create Repository.
- Your repository is officially created!
- Click .gitignore to add a gitignore file.
- Paste the following text into the file editor on GitHub. Here is an explanation of the .gitignore file. Suffice to say, we are only going to sync our presets and brushes for now.
6.7/ Layout\ Templates/ Auto\ Layout\ Presets/ Lightroom\ 5.0\ Registration/ Color\ Profiles/ Locations/ Device\ Icons/ Metadata\ Presets/ Email\ Address\ Book/ Preferences/ Slideshow\ Templates/ FTP\ Presets/ Text\ Style\ Presets/ Filename\ Templates/ Text Templates/ Watermarks/ Web\ Galleries/ Keyword\ Sets/ Web\ Templates/ Label\ Sets/ Lightroom 5.0 Registration
- It should look like this:
- Add a description like “added .gitignore file” and click commit.
Getting Your Latest Lightroom Into Git
Now we need to populate your repository with your current Lightroom files. In version control parlance, this is called the initial import.
One note for you VSCO users: VSCO also uses Camera Profiles that are required to get presets looking correct. This process does not sync Camera profiles. You will need to run your VSCO installer on every computer that you use Lightroom on, just as you were before.
Please make sure you have installed the GitHub Desktop app. BTW, from here on, we will assume you’re on a OS X machine. You can do all this from a Windows machine (in fact when I first set this up we had both windows and Mac computers in use in our studio), but the screenshots will be different and the paths will different.
Also, from here on in, you can SERIOUSLY mess up and lose your settings. DO NOT SKIP CREATING A BACKUP when told to and you should probably keep it around until you are sure you have every machine working!
- Go to Lightroom app on the machine you are going to use for the initial import of your Lightroom presets. This should be the machine with the latest changes you’ve made. Further on, we we are going to clone all the other machines from this initial setup.
- Find your preset folder.
- To find your presets in Lightroom, go to Develop. Right-click one of your presets, and choose “show in Finder.”
- Go up two folders until you are in the “Lightroom” folder.
We are going delete this folder when we clone the repository, so we need a backup. Also, backups are just generally a good idea. - Copy all the files and folders you see above into another folder anywhere else on your Mac. I created a folder called “Lightroom Backup” in Documents. You do you.
- Now log into your Github account, navigate to the repository and click the “clone or download” button.
- If you’ve already installed Github Desktop app you can click Open In Desktop.
- This will open the Clone As window in the Github Desktop App.
- Navigate to where the Lightroom folder exists (this is the Adobe folder above the folders we just backed up) at ~/Library/Application Support/Adobe/.
- Enter “Lightroom” in the “Clone As” field and press enter.
- Click “Clone” and it will ask you to confirm you want to replace the Lightroom folder. Say “Replace”.
- Now you should see your latest commit from the above step where we created our .gitignore file.
- At this point, Github has blown away your Lightroom Folder. Now we need to copy it back from our backup back into the “Lightroom” folder Github Desktop just created.
- Now if you go back to Github Desktop, you should see a bunch of “Uncommitted Changes”
- We need to commit these changes to our local repository and then push them to the remote repository.
- Enter a summary for your commit and a description and click “Commit to master”.
- Now we need to push our local changes to the remote server by pressing the “Sync” button in the top right of the Github Desktop window.
- At this point you’re done on this machine.
Setting Up Other Machines
Now that we have set up our repository and imported our base presets we can begin to clone this repository down to your other machines and merge in any changes found on those machines. Again, same disclaimer as before: Take it slow and keep your backups until you are sure each machine is set up properly.
- Go to Lightroom app on the new machine.
- Find your preset folder.
- To find your presets in Lightroom, go to Develop. Right-click one of your presets, and choose “show in Finder.”
- Go up two folders until you are in the “Lightroom” folder.
We are going delete this folder when we clone the repository, so we need a backup. - Copy all the files and folders you see above into another folder anywhere else on your Mac just like we did before.
- Now log into your Github account in Github Desktop, click the +, in the top left, then click “Clone”, choose the repository you created earlier and click “clone repository”
- This will open the Clone As window in the Github Desktop App.
- Navigate to where the Lightroom folder exists (this is the Adobe folder above the folders we just backed up) at ~/Library/Application Support/Adobe/.
- Enter “Lightroom” in the “Clone As” field and press enter.
- Click “Clone” and it will ask you to confirm you want to replace the Lightroom folder. Say “Replace”.
- Now you should see your latest commit from the above step where we did our initial import.
- At this point, Github has blown away your Lightroom Folder. Now we need to copy it back from our backup back into the “Lightroom” folder Github Desktop just created and paste it back over what Github just created. OS X will ask us if we want to replace the folders that already exist.
- If your machines are already synced and have the same presets, this will not be an issue. If your machines do have differences, you will need to merge those changes.
- If there are presets that exist on this machine that were not included in your initial import, you will need to commit those changes.
- If you do commit changes, then you will need to pull those changes down on the other machines.
- Once you have no merge conflicts and no changes left to commit, this machine is ready to go, you can now repeat this process until every machine is up to date.
Example 1: Pushing a New Change
Ok, so you’ve got all your machines set up and you’ve been editing for a while and you realize, dang bro, this moody B+W preset needs more grain! Let’s modify a preset, push that change up to the repository.
- Let’s assume you’ve changed the Grain Amount on your Moody B+W preset in Lightroom. If you were to go to GitHub Desktop you would see this:
- Now we need to commit this locally. So add a summary and description and press Commit to master.
- Press the Sync button
.- BTW, here is what the Sync Button does: it pulls down what is on the server, then it “replays” whatever changes you’ve made locally. If there are no merge conflicts, it pushes your changes to the remote repository. If there are merge conflicts, it pauses until you can fix them, then allows you to push them to the remote server. This is really, really good. This process helps keep the server repository “clean,” meaning it should never break another user’s ability to work.
- All set, you’ve pushed your changes to the remote, time to continue on!
- P.S. – if you’ve pulled down some changes while Syncing, you should close and re-open Lightroom.
Example 2: Pulling a Change From Another User
Nice work on that Moody B+W!! But Kelly (or whomever else you are working with) thinks that B+W needs some tweaking. You’ve got to up that Grain Size too!! Kelly makes her changes and pushes them to the remote repository, let’s go get them!
- Go to GitHub Desktop and press the Sync button.
- Now if we go to the History tab
in GitHub Desktop, we can see the latest change Kelly made to our Moody B+W preset.
- Boom, you have Kelly’s latest changes!
Example 3: Dealing With a Merge Conflict
Let’s say that you disagree with Kelly’s change on the Grain Size, you think it should be 29. Meanwhile, Kelly does some more editing and decides, she was wrong too, it should be 30. So, Kelly goes through the steps in Example 1 again and pushes her change to the remote server with a grain size of 30. Now you attempt to also follow Example 1 and push your change of 29 to the remote server. You are about to enter into the wonderful world of merge conflicts.
- When you attempt to Sync, you will see the merge conflict error.
- Click Close and then Open in External Editor.
- We are going to do this in a Text Editor, just so you can see what we are dealing with and I can explain it a bit.
- I highly suggest you install a decent Merge Tool and Setup Github Desktop to use it. Here is a post about setting up DiffMerge (a GUI tool for performing merges) as your default merge editor: Setup guide for making git recognize and use DiffMerge (It’s not as scary as it looks!)
- Now, we have our Moody Preset open in TextEdit and we can clearly see our merge conflict on the GrainSize.
- A couple things to identify here:
- HEAD indicates what is your local changes.
- origin/master indicates the conflict from the changes on the remote server.
- We need to decide which setting to keep.
- In this case, I love my wife and trust her eye implicitly, so we are going to go with her change of 30.
- Typically your merge conflicts will be more complex than this. So seriously, get a merge tool. 🙂
- To resolve the merge, I will manually edit the file so only her change is left.
- As you can see, I’ve removed the unnecessary lines which indicated the merge conflict and removed my erroneous “GrainSize = 29,” so there is only one correct setting being changed.
- Save the file!
- Now I can go back to Github Desktop and finish resolving the merge by committing my merge locally
- Now everything is in order and I can continue to work.
Using This Practically
So, as I said, this is not for the faint of heart, and I’ll say this again, you should read this: Version Control with Git [Git Basics] before you attempt to use this.
But once you get this system set up, it’s really quite powerful for syncing Lightroom presets, brushes, etc. between multiple machines! And in most cases, you won’t change your presets that often, right? 🙂
The big things to remember here is communication. If you are on a small team (it’s just me and my wife, sitting in the same room) then its easy. Just tell the other person when you’ve pushed some changes.
If you are on a bigger team, you should get in the habit of pulling down any changes (Syncing in the Github Desktop verbiage) before you begin to edit, this will make it easier to not get stuck in merge conflicts.
How To Use The .gitignore To Define What Is Sync’d
The .gitignore file tells git what files or directories to ignore when determining what has changed on your machine. You use it by adding folders or file names to it if you want to NOT sync them.
The example .gitignore we included in this post configures git to only sync the following things:
Develop Presets Export Presets Filter Presets Local Adjustment Presets Smart Collection Templates
To stop syncing one of these I would simply add that folder to the .gitignore file. For example, If I want to stop syncing Brushes, which are store in the “Local Adjustment Presets” folder, I would open the .gitignore file from the Lightroom folder in Finder and add the following line:
Local\ Adjustment\ Presets/
Notice the “\” which indicate the space following is supposed to be there. Also, notice the “/” at the end which indicates this is a folder.
Now I would save this .gitignore file and commit it to the repository. From now on, git would no longer watch for changes to the Brushes folder.
The process to add a folder is the opposite. Just edit your .gitignore and remove the line that corresponds to the folder you want to start syncing.
I have not tested this process with any other folders not included in .gitignore included in the post. So I have no idea if syncing other files or folders in the Lightroom will break the installation on another machine. Use this with caution! At a minimum, I would definitely not sync the “Lightroom 5.0 Registration” which contains your registration file and will likely cause your Lightroom to not open!
Excellent tool and write up! I’ve bookmarked it since I would like to try this between two machines that we use for developing. I really appreciate the time and effort it took to document this.
I am bookmarking this post – I use two computers to do my editing and need to be able to work seamlessly between them. I’m hoping this will help streamline that process! Thank you for the detailed instructions.