<p>It's a good practice to designate one instance on one computer (or server) as the "canonical" instance. You can make all database changes there, adding fields, etc. It's easy to download that database via the Backup Database tool in the admin panel. You can then import that dump file into databases on other machines as needed with a tool like SequelPro (Mac).</p>

<p>Some prefer to include an updated database dump file in the git repo every time a change is made but that can get pretty tricky.</p>

CC BY-SA 3.0
2015-12-02T19:57:57.743Z
2015-12-02T19:57:57.743Z
Sam Hernandez
<p>I have Craft set up and am using it for the first time. It seems to be ok. I am using git to back up my project to Github and push/pull it between computers as I partly work on my desktop (Windows) but also work on my laptop (Mac).</p>

<p>My issue is that when I pull to another PC often Craft database stuff is not the same. I lose changes made e.g. images that I’ve uploaded (even though they are in the actual Craft Image folder in my folders) or Matrix changes.
I didn’t realise this was happening and at first assumed my images weren’t updated because I’d forgotten to push to git before making changes on my laptop but when I went to pull my laptop changes to my Desktop last night and then tried accessing my Craft website through MAMP I got this error :</p>

<pre><code>Craft\MatrixBlockModel and its behaviors do not have a method or closure named "myBlockSummary".
</code></pre>

<p>"myBlockSummary" is a matrix thing I added last night on my laptop. My sass and html and image files are moving correctly with git which is why Craft is confused(?), looking for something on the database (myBlockSummary) which I suppose isn’t there. The website works on the laptop that I pulled it from.</p>

<p>How can I easily continue using git and going between computers but have the database be included also?</p>

<p>This information on using Craft with git has not helped me really:
<a href="https://craftcms.com/help/craft-storage-gitignore" rel="nofollow">https://craftcms.com/help/craft-storage-gitignore</a>
“So unless you have a way to keep the databases in sync between servers, there’s not a whole lot of point to sharing these files.”
Are they saying this is not possible?</p>

<p>Thank you for any help.</p>

<database><git>
Craft database and Github - using multiple computers. Issue
# Craft database and Github - using multiple computers. Issue

(Asked by: username_0 on 2015-12-02)

I have Craft set up and am using it for the first time. It seems to be ok. I am using git to back up my project to Github and push/pull it between computers as I partly work on my desktop (Windows) but also work on my laptop (Mac).
My issue is that when I pull to another PC often Craft database stuff is not the same. I lose changes made e.g. images that I’ve uploaded (even though they are in the actual Craft Image folder in my folders) or Matrix changes.
I didn’t realise this was happening and at first assumed my images weren’t updated because I’d forgotten to push to git before making changes on my laptop but when I went to pull my laptop changes to my Desktop last night and then tried accessing my Craft website through MAMP I got this error :
Craft\MatrixBlockModel and its behaviors do not have a method or closure named "myBlockSummary".

"myBlockSummary" is a matrix thing I added last night on my laptop. My sass and html and image files are moving correctly with git which is why Craft is confused(?), looking for something on the database (myBlockSummary) which I suppose isn’t there. The website works on the laptop that I pulled it from.
How can I easily continue using git and going between computers but have the database be included also?
This information on using Craft with git has not helped me really:
https://craftcms.com/help/craft-storage-gitignore
“So unless you have a way to keep the databases in sync between servers, there’s not a whole lot of point to sharing these files.”
Are they saying this is not possible?
Thank you for any help.

**Tags:** database, git

---

## 1 answers

### Answer by username_1 on 2015-12-02. Score: 2

It's a good practice to designate one instance on one computer (or server) as the "canonical" instance. You can make all database changes there, adding fields, etc. It's easy to download that database via the Backup Database tool in the admin panel. You can then import that dump file into databases on other machines as needed with a tool like SequelPro (Mac).

Some prefer to include an updated database dump file in the git repo every time a change is made but that can get pretty tricky.


---

