# How do you handle SQlite3 files between branches in git

**URL:** <https://www.ruby-forum.com/t/how-do-you-handle-sqlite3-files-between-branches-in-git/164438>\
**Category:** Rails\
**Created:** [April 1, 2009, 1:15pm UTC](https://www.ruby-forum.com/t/how-do-you-handle-sqlite3-files-between-branches-in-git/164438 "2009-04-01T13:15:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MartOn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/6a8cbe/32.png) [@MartOn](https://www.ruby-forum.com/u/MartOn)\
**Post date:** [April 1, 2009, 1:15pm UTC](https://www.ruby-forum.com/t/how-do-you-handle-sqlite3-files-between-branches-in-git/164438/1 "2009-04-01T13:15:50Z")

</div>

Hello  
I now this should maybe be put in a git group, but I guessing many  
rails developers (if using sqlite3) for development have a good idea…

I have an application with different branches, so my SQlite3 file get  
dependant on branch.  
I have the file ignored by git, so changing branch will keep my  
database.

but what I really would like was it to switch to the last from that  
branch?  
I´m not sure this is clever…

thats why I am asking you developers, how do you handle this?

/MartOn

---

<div class="post-metadata">

**Author:** ![MartOn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/6a8cbe/32.png) [@MartOn](https://www.ruby-forum.com/u/MartOn)\
**Post date:** [April 1, 2009, 3:18pm UTC](https://www.ruby-forum.com/t/how-do-you-handle-sqlite3-files-between-branches-in-git/164438/2 "2009-04-01T15:18:10Z")

</div>

MartOn wrote:

> Hello  
> I now this should maybe be put in a git group, but I guessing many  
> rails developers (if using sqlite3) for development have a good idea…
> 
> I have an application with different branches, so my SQlite3 file get  
> dependant on branch.  
> I have the file ignored by git, so changing branch will keep my  
> database.
> 
> but what I really would like was it to switch to the last from that  
> branch?  
> Iï¿½m not sure this is clever…
> 
> thats why I am asking you developers, how do you handle this?
> 
> /MartOn

What I do is add \*.sqlite3 to my .gitignore file, so it’s no longer an  
issue. Other developers that might be working on the project probably  
don’t want your database files in their clone anyway.
