Answers.Body: <p>Second try: do a git checkout  -f</p>
  
  <p>To force overwrite of local files!</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-15T23:03:07.760Z
Answers.LastActivityDate: 2017-03-15T23:03:07.760Z
Answers.UserDisplayName: JohnFF
Answers.Body: <p>Firstly, I don't think that git checkout would overwrite files without doing a git pull, would it? Those files need to be overwritten with the new version.</p>
  
  <p>The next thing is that you probably need to visit the upgrade URL:</p>
  
  <p>http:///civicrm/upgrade?reset=1</p>
  
  <p>Good luck!</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-15T22:32:12.960Z
Answers.Text: That didn't do it for me. (Updated my question for clarification)
Answers.UserDisplayName: Sean
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-15T22:26:18.813Z
Answers.LastActivityDate: 2017-03-15T22:26:18.813Z
Answers.UserDisplayName: JohnFF
Answers.Body: <h2>tldr</h2>
  
  <pre><code>cd buildkit/build/dmaster/sites/all/modules/civicrm
  
  ## Ensure that all your stuff is clean/committed.
  git scan status
  
  ## Update git repos. Choose ONE of:
  git scan up
  ./bin/givi checkout X.Y.Z
  
  ## Regenerate data. Choose ONE of:
  civibuild reinstall dmaster
  ./bin/setup.sh -Dg &amp;&amp; drush civicrm-upgrade-db
  </code></pre>
  
  <h2>Checking the git repos</h2>
  
  <p>There are multiple git repos in your build (<code>civicrm-core.git</code>, <code>civicrm-packages.git</code>, etal). Before making a major switch, I first double-check that all of these repos are in sane condition -- ie there shouldn't be any uncommitted changes, the repos should be on normal branches, etc. </p>
  
  <pre><code>git scan status
  </code></pre>
  
  <h2>Updating the git repos</h2>
  
  <p>As a developer who tracks mainline branches, my day-to-day interest is "updating to the latest revision of <code>master</code> or <code>4.6</code>". The command <code>git scan up</code> will perform a standard "fast-forward merge" (<code>git pull --ff-only</code>) across all the repos:</p>
  
  <pre><code>git scan up 
  </code></pre>
  
  <p>(Tip: If you didn't cleanup earlier, then "fast-forward" may not be possible. It takes some judgment to decide what to do -- e.g. a "merge" versus "rebase". Rather than risk a wrong decision, <code>git scan</code> will skip these repos and display warnings instead.)</p>
  
  <p>Your example uses a tag. Hopping among tags is a bit different than tracking a branch. For this, I use <code>givi</code>:</p>
  
  <pre><code>./bin/givi checkout 4.7.17
  </code></pre>
  
  <h2>Updating the generated code, config files, databases</h2>
  
  <p>As a developer who does weird things on a day-to-day basis (like manually hacking SQL records to provoke weird situations), I have trouble remembering all the weird things that I've done before -- and honestly don't care about them afterward. I just want to get back to a consistent/clean state. Reinstalling is nice because it recreates/overwrites all generated-code, config-files, and database content.</p>
  
  <pre><code>civibuild reinstall dmaster
  </code></pre>
  
  <p>However, that does reset all the data. If you care about the content in the database, then don't do a reinstall. Instead, update the generated-code and perform a DB upgrade:</p>
  
  <pre><code>./bin/setup.sh -Dg
  drush civicrm-upgrade-db
  </code></pre>
  
  <h2>See also</h2>
  
  <p>For more discussion, see the blog post: <a href="https://civicrm.org/blogs/totten/developer-tip-managing-multiple-git-repositories" rel="noreferrer">https://civicrm.org/blogs/totten/developer-tip-managing-multiple-git-repositories</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-17T02:47:07.673Z
Answers.Text: This documentation was migrated to: https://docs.civicrm.org/dev/en/latest/tools/civibuild/#upgrade-site
Answers.UserDisplayName: Sean
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-15T23:19:57.500Z
Answers.LastActivityDate: 2017-03-15T23:25:25.913Z
Answers.LastEditDate: 2017-03-15T23:25:25.913Z
Answers.UserDisplayName: Tim Otten
Body: <p>A while back I did</p>
  
  <pre><code>$ civibuild create demo.local --type drupal-demo --url http://demo.local
  </code></pre>
  
  <p>and got a working local site running CiviCRM 4.7.9. <strong>Great.</strong></p>
  
  <hr>
  
  <p>Now I'd like to upgrade this site to 4.7.17. </p>
  
  <p>I tried: </p>
  
  <pre><code>$ cd ~/buildkit/build/demo.local/sites/all/modules/civicrm
  $ git fetch
  $ git checkout 4.7.17
  $ cv flush
  $ drush civicrm-upgrade-db
  </code></pre>
  
  <p>The last command gives <code>You are already upgraded to CiviCRM 4.7.9</code>. </p>
  
  <p>What did I miss?</p>
  
  <p>EDIT: </p>
  
  <p>Also I have tried:</p>
  
  <pre><code>$ git checkout master
  $ git pull
  </code></pre>
  
  <p>as well as browsing to <code>http://demo.local/civicrm/upgrade?reset=1</code> to perform the database upgrades <em>(Which tells me "Your database has already been upgraded to CiviCRM 4.7.9")</em></p>
  
Tags: <upgrade><civicrm-buildkit><civibuild>
Title: How do I upgrade CiviCRM on a local site that I installed with buildkit civibuild?
ThreadText: # How do I upgrade CiviCRM on a local site that I installed with buildkit civibuild?
  
  (Asked by: username_0 on 2017-03-15)
  
  A while back I did
  
  ```
  $ civibuild create demo.local --type drupal-demo --url http://demo.local
  
  ```
  
  and got a working local site running CiviCRM 4.7.9. **Great.**
  
  ---
  
  Now I'd like to upgrade this site to 4.7.17.
  
  I tried:
  
  ```
  $ cd ~/buildkit/build/demo.local/sites/all/modules/civicrm
  $ git fetch
  $ git checkout 4.7.17
  $ cv flush
  $ drush civicrm-upgrade-db
  
  ```
  
  The last command gives `You are already upgraded to CiviCRM 4.7.9`.
  
  What did I miss?
  
  EDIT:
  
  Also I have tried:
  
  ```
  $ git checkout master
  $ git pull
  
  ```
  
  as well as browsing to `http://demo.local/civicrm/upgrade?reset=1` to perform the database upgrades *(Which tells me "Your database has already been upgraded to CiviCRM 4.7.9")*
  
  **Tags:** upgrade, civicrm-buildkit, civibuild
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_2 on 2017-03-15. Score: 5 | Accepted answer
  
  ## tldr
  
  ```
  cd buildkit/build/dmaster/sites/all/modules/civicrm
  
  ## Ensure that all your stuff is clean/committed.
  git scan status
  
  ## Update git repos. Choose ONE of:
  git scan up
  ./bin/givi checkout X.Y.Z
  
  ## Regenerate data. Choose ONE of:
  civibuild reinstall dmaster
  ./bin/setup.sh -Dg && drush civicrm-upgrade-db
  
  ```
  
  ## Checking the git repos
  
  There are multiple git repos in your build (`civicrm-core.git`, `civicrm-packages.git`, etal). Before making a major switch, I first double-check that all of these repos are in sane condition -- ie there shouldn't be any uncommitted changes, the repos should be on normal branches, etc.
  
  ```
  git scan status
  
  ```
  
  ## Updating the git repos
  
  As a developer who tracks mainline branches, my day-to-day interest is "updating to the latest revision of `master` or `4.6`". The command `git scan up` will perform a standard "fast-forward merge" (`git pull --ff-only`) across all the repos:
  
  ```
  git scan up 
  
  ```
  
  (Tip: If you didn't cleanup earlier, then "fast-forward" may not be possible. It takes some judgment to decide what to do -- e.g. a "merge" versus "rebase". Rather than risk a wrong decision, `git scan` will skip these repos and display warnings instead.)
  
  Your example uses a tag. Hopping among tags is a bit different than tracking a branch. For this, I use `givi`:
  
  ```
  ./bin/givi checkout 4.7.17
  
  ```
  
  ## Updating the generated code, config files, databases
  
  As a developer who does weird things on a day-to-day basis (like manually hacking SQL records to provoke weird situations), I have trouble remembering all the weird things that I've done before -- and honestly don't care about them afterward. I just want to get back to a consistent/clean state. Reinstalling is nice because it recreates/overwrites all generated-code, config-files, and database content.
  
  ```
  civibuild reinstall dmaster
  
  ```
  
  However, that does reset all the data. If you care about the content in the database, then don't do a reinstall. Instead, update the generated-code and perform a DB upgrade:
  
  ```
  ./bin/setup.sh -Dg
  drush civicrm-upgrade-db
  
  ```
  
  ## See also
  
  For more discussion, see the blog post: <https://civicrm.org/blogs/totten/developer-tip-managing-multiple-git-repositories>
  
  > **Comments:**
  > **username_0**: This documentation was migrated to: https://docs.civicrm.org/dev/en/latest/tools/civibuild/#upgrade-site  
  
  ---
  
  ### Answer by username_1 on 2017-03-15. Score: 0
  
  Second try: do a git checkout -f
  
  To force overwrite of local files!
  
  
  ---
  
  ### Answer by username_1 on 2017-03-15. Score: 0
  
  Firstly, I don't think that git checkout would overwrite files without doing a git pull, would it? Those files need to be overwritten with the new version.
  
  The next thing is that you probably need to visit the upgrade URL:
  
  http:///civicrm/upgrade?reset=1
  
  Good luck!
  
  > **Comments:**
  > **username_0**: That didn't do it for me. (Updated my question for clarification)  
  
  ---
  
  