# Update code from Git repo

**URL:** <https://pressbooks.community/t/update-code-from-git-repo/4260>\
**Category:** Developer Questions\
**Created:** [March 8, 2018, 5:07pm UTC](https://pressbooks.community/t/update-code-from-git-repo/4260 "2018-03-08T17:07:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ETNA](https://pressbooks.community/letter_avatar_proxy/v4/letter/e/5f9b8f/32.png) [@ETNA](https://pressbooks.community/u/ETNA)\
**Post date:** [March 8, 2018, 5:07pm UTC](https://pressbooks.community/t/update-code-from-git-repo/4260/1 "2018-03-08T17:07:41Z")

</div>

Hi!

I’m using the open source code of Pressbooks in a personal local development.  
I opened a project in PhpStorm (I downloaded the pressbooks-book-2.0.1.zip).  
I would like to know how I should update my version of Pressbooks from GIT- without losing my personal changes (on Pressbooks code).

Thanks in advance,  
Etna

---

<div class="post-metadata">

**Author:** ![ned](https://pressbooks.community/user_avatar/pressbooks.community/ned/32/533_2.png) [@ned](https://pressbooks.community/u/ned)\
**Post date:** [March 8, 2018, 6:57pm UTC](https://pressbooks.community/t/update-code-from-git-repo/4260/2 "2018-03-08T18:57:58Z")

</div>

Hi @ETNA, if you’re working with the code directly instead of just installing it, I’d suggest creating a fork on GitHub and cloning it. You’ll need to run `composer install` from within the `wp-content/plugins/pressbooks` directory to load the dependencies. Then, you can add [GitHub - pressbooks/pressbooks: Open publishing. Open web. Open source.](https://github.com/pressbooks/pressbooks.git) as an `upstream` repo and merge changes from upstream into your fork when they become available. For more information on this technique, see here:

- [Syncing a fork - GitHub Docs](https://help.github.com/articles/syncing-a-fork/)
- [Configuring a remote repository for a fork - GitHub Docs](https://help.github.com/articles/configuring-a-remote-for-a-fork/)
