<p>I got this error when I checked out my database from source control. It might sounds weird to check in the sql server database, but this was what I have done because this is just a personal project.</p>

<p>Anyone knows how to fix this?</p>

You really don't want to be checking database files into and out of source control - in SQL Server you have to detach the files for this to even work and you run all kinds of risks.
If you absolutely have to do this, you should version backups.
I recommend versioning a script which creates the entire database (tables, sprocs, views, etc.)
You can try creating a database attaching from that data file and using
Create Database
the
```
ATTACH_REBUILD_LOG
```
option, but I'm not confident it's going to work since they probably weren't detached properly.