Showing posts with label git. Show all posts
Showing posts with label git. Show all posts

Monday, October 24, 2011

Steps to deploy changes to a RoR application to the production machine

List the differences between local (deployment) and the remote (production) Git repositories

$ git diff master <alias of the production remote repo>/master --stat


The steps to push changes to remote Git, and deploy the changes on the production server:

$ git add .
$ git commit -m "modified ... files"
$ git push < alias of the production remote repo >

If there are no database schema changes to deploy:
$ cap deploy

If there are database schema changes:
$ cap deploy:migrations

Friday, October 21, 2011

Use Meld as a GUI for Git diff

To diff a directory in the workspace with Git's staging area

06:24 PM ~/app_0515 $ git difftool -t meld app/views

Viewing: 'app/views/participants/index.html.erb'
Hit return to launch 'meld':

Viewing: 'app/views/sent_messages/index.html.erb'
Hit return to launch 'meld':

Viewing: 'app/views/sent_messages/show.html.erb'
Hit return to launch 'meld':


To diff between the master branch and a remote branch

07:37 PM ~/app_0515 $ git difftool -t meld home/master master

Viewing: 'app/controllers/participants_controller.rb'
Hit return to launch 'meld':


Viewing: 'app/helpers/application_helper.rb'
Hit return to launch 'meld':
Viewing: 'app/models/participant.rb'
Hit return to launch 'meld':

Viewing: 'app/views/participants/index.html.erb'
Hit return to launch 'meld':

Viewing: 'app/views/sent_messages/index.html.erb'
Hit return to launch 'meld':

Viewing: 'app/views/sent_messages/show.html.erb'
Hit return to launch 'meld':



To diff between the repository and the staging area:
12:42 PM ~/lib/rubygsm $ git difftool -t meld HEAD core.rb

Viewing: 'lib/rubygsm/core.rb'
Hit return to launch 'meld':