Posted by & filed under Javascript/YUI/jQuery, Web Development.

Unless you are a pretty experienced Git user, updating your yui3-gallery fork for a new Yahoo CDN pull request can be tricky. Here is one way you can do this, the following steps assume that you have defined the official yui3-gallery Git repository as a remote source in your repository entitled “upstream”…

Unless you are a pretty experienced Git user, updating your yui3-gallery fork for a new Yahoo CDN pull request can be tricky. Here is one way you can do this, the following steps assume that you have defined the official yui3-gallery Git repository as a remote source in your repository entitled “upstream”:

  1. remove your stuff that was a part of your last CDN pull request residing in the “build” directory (i.e. rm -rf build/gallery-yourproject)
  2. git commit -a to commit this deletion to your repository. Your commit message can be something along the lines of “preparing for new git pull from upstream”
  3. git pull upstream master
  4. this will generate conflict messages about how your build files were “deleted in HEAD and modified in <some git rev>”, but you’ll notice that it also says that the git revision was “left in tree”.  You’ll notice that a fresh copy of the build files for your deleted project lives in your build directory now
  5. git add build/gallery-yourproject to add this back to the repository
  6. git commit -a to save the results of this merge
  7. git push to push your changes up to GitHub