git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Fwd: how to apply patch?

From
Matt Di Pasquale <liveloveprosper@gmail.com>
Date
Feb 7, 2010, 02:05 UTC
Message-ID
<13f0168a1002061805o5d64c05cy9d8f0190a8f37feb@mail.gmail.com>
In-Reply-To
<13f0168a1002061720t93ff6aew3420a41a547549d8@mail.gmail.com>

I have a development version & a production version of my website. There are a few essential differences between them that I want to always stay different (like path constants, etc). When I make changes on the dev version and test it out and they work and am ready to copy them to the production (www) version, how do i do that without annihilating the essential differences that i want to keep? I was thinking of creating a patch or branch or something with the differences. Then, copy dev to pro, then reapply/rebase the essential differences to pro that got wiped out. if i rebase though, i want to be able to rebase again on the next edit. what's a good way to do this?

My dir structure:
example.com
  www  # production site
  dev   # development site

Via DreamHost control panel: www.example.com points to example.com/www/ dev.example.com points to example.com/dev/

Why don't I just have a branch called dev? Maybe I should... Advice? (Anyway, it's nice to be able quickly, simultaneously open corresponding files from both www & dev in textmate. I guess I could do that with like git show master:www/index.html | mate or something, but then it opens in a new textmate window. it's just not the same. I guess there's always the possibility of editing www/index.html when I actually want to be editing dev/index.html, but then again, it's also possible to be editing the wrong branch.)

My .git/config file has the following aliases for deployment:

# deploy dev ddev = !rsync -avi --copy-unsafe-links --exclude='*.DS_Store' --delay-updates --delete-after --delete-excluded -e ssh ~/Sites/example.com/dev/ acani@acani.com:Sites/example.com/dev/

# deploy www dpro = !rsync -avi --copy-unsafe-links --exclude='*.DS_Store' --delay-updates --delete-after --delete-excluded -e ssh ~/Sites/example.com/www/ username@example.com:Sites/example.com/www/

Thanks!
Matt
Next: Tay Ray Chuan
Message 1 of 4 in “Fwd: how to apply patch?”
  1. Matt Di PasqualeFeb 7, 2010
  2. Tay Ray ChuanFeb 7, 2010
  3. Matt Di PasqualeFeb 7, 2010
  4. Tay Ray ChuanFeb 7, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.