Created
October 13, 2011 04:32
-
-
Save leobalter/1283386 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tips for jQuery Mobile Bug Patching | |
# There are some assumptions made here, one being that you're | |
# set up with some form of "localhost" http server and that it's running. | |
# - http://www.mamp.info/en/mamp/ | |
# - sudo apt-get install apache | |
# Get it running: | |
# On Mac: | |
$ python -m SimpleHTTPServer | |
# On Linux: | |
$ sudo /etc/init.d/apache2 start | |
# If you do not have git installed, check these out: | |
# - http://help.github.com/mac-git-installation/ | |
# - http://help.github.com/linux-git-installation/ | |
# Change directory to your web root directory, whatever that might be: | |
$ cd /path/to/your/www/root/ | |
# Clone your jQuery Mobile fork to work locally | |
$ git clone [email protected]:username/jquery-mobile.git | |
# Change directory to the newly created dir jquery-mobile/ | |
$ cd jquery-mobile | |
# Add the jQuery Mobile master as a remote, I label mine "upstream" | |
$ git remote add upstream git://github.com/jquery/jquery-mobile.git | |
# Get in the habit of pulling in the "upstream" master to stay | |
# up to date as jQuery Mobile receives new commits | |
$ git pull upstream master | |
# Build the jQuery Mobile source | |
$ make | |
# Open the jQuery test suite in a browser (I use Google Chrome, | |
# change this to your preferred browser). | |
# Linux | |
$ google-chrome http://localhost/jquery-mobile/tests | |
# Mac | |
$ open http://localhost/jquery-mobile/tests | |
# Success! You just built and tested jQuery Mobile! | |
# Fixing a bug from a ticket filed at github.com/jquery/jquery-mobile/issues: | |
# NEVER write your patches to the master branch - it gets messy (I say this from experience!) | |
# | |
# ALWAYS USE A "TOPIC" BRANCH! Like so... | |
# | |
# #### = the ticket # | |
# Make sure you start with your up-to-date master | |
$ git checkout master | |
# Create and checkout a new branch that includes the ticket # | |
$ git checkout -b bug_#### | |
# ( Explanation: this useful command will: | |
# "checkout" a "-b" (branch) by the name of "bug_####" | |
# or create it if it doesn't exist ) | |
# Now you're on branch: bug_#### | |
# Open up files and make changes | |
# Once you're satisfied with your patch... | |
# Stage the files to be tracked: | |
$ git add filename | |
# (you can use "git status" to list the files you've changed) | |
# ( I recommend NEVER, EVER using "git add . " ) | |
# Once you've staged all of your changed files, go ahead and commit them | |
$ git commit -m "Bug #####; Brief description of fix" | |
# Then, push your branch with the bug fix commits to your github fork | |
$ git push origin -u bug_#### | |
# Before you tackle your next bug patch, return to the master: | |
$ git checkout master | |
# To send a Pull Request for your patch, go to http://github.com/you/jquery-mobile | |
# Click "Switch Branches" and select the branch that has your patch. | |
# Once the branch is loaded, click on "Pull Request". Be sure to include the | |
# ticket #### in the subject, along with a brief description. | |
# Feel free to add YOUR tips in the comment section below! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment