Skip to content

Instantly share code, notes, and snippets.

@benlk
Last active October 23, 2015 22:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benlk/a433f60e7bc84f404eb9 to your computer and use it in GitHub Desktop.
Save benlk/a433f60e7bc84f404eb9 to your computer and use it in GitHub Desktop.
Updating largo-umbrella with a new commit

Check out inn/docs, folder projects/largo

This gist is out of date.

Assumptions:

This guide to updating the Largo umbrella makes the following assumptions:

We'll start in the root of the largo-umbrella repository, and we're going to commit a change to the invw theme.

First, check to see what's going on

git status

You may see a message like:

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)
  (commit or discard the untracked or modified content in submodules)

	modified:   tools (untracked content)

This is normal! It means you have modified something in the tools/ submodule and it will be overwritten unless you save it.

	modified:   wp-content/themes/largo-dev (new commits)
	modified:   wp-content/themes/npq (new commits)

These are themes where there are new commits locally. You should push them to their repository, but they'll stay around even if you don't.

Untracked files:
  (use "git add <file>..." to include in what will be committed)

	phpMyAdmin/
	searchreplacedb2.php
	wp-content/db.php

You don't need to worry about these, unless you want to git add them to the repository.

Update the umbrella

git checkout master
git fetch
git pull
git submodule update --recursive

What you've just done is:

  1. Switch to the 'master' branch of the repo
  2. Copy commits from the remote repository
  3. Copy the code of the current 'master' commit from the remote repo
  4. Update all the submodules according to the current 'master' commit's plans.

git adding your updates

Now that the umbrella theme and all submodules are checked out and updated, you can go in and update your theme submodule's commit in the repo.

cd wp-content/themes/invw
git checkout master

You can substitute master for any other commit or branch you want to commit to the umbrella master. Just make sure that that commit or branch has been pushed to the theme's own repository on BitBucket or GitHub.

Now cd back to the umbrella root

cd -
git add wp-content/themes/invw

This will register the new submodule commit with the umbrella repo.

git commit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment