I have made a deploy with capistrano in a repository remote.
I’m novice with git.
Now I want update some files and make updates of my website…etc with git, because capistrano its more slowly if I run new deploy.
For updates files in remote repository I have made this steps:
1º
git add .
2º
git commit -a -m "changes made"
3º
git push origin master
4º
git pull origin master
However if I see the files in remote repository the changes have not been made :(.
on the last step I get this result in console:
ubuntu@ubuntu:~/Desktop/project$ git pull origin master
user@ip.ip.ip.ip's password:
From ip.ip.ip.ip:~/project
* branch master -> FETCH_HEAD
Already up-to-date.
Edited with result step 3
after step 3 I get:
git push origin master
user@ip.ip.ip.ip's password:
Counting objects: 110, done.
Compressing objects: 100% (57/57), done.
Writing objects: 100% (71/71), 447.59 KiB, done.
Total 71 (delta 30), reused 0 (delta 0)
To user@ip.ip.ip.ip:~/project
33b8849..769d87d master -> master
Edited with structure folder in remote server and capistrano deploy.rb
I have 2 directories project and project.com:
The first is project , in this directory is where the new changes are made.
and this directory have branches config description HEAD hooks info objects refs
The second directory is project.com is my domain folder, inside this directory I have 2 directories:
current, releases and shared
Inside releases directory is my release project deployed via capistrano with a directory like:
20120323164859
and inside current I have my rails 3.1 app.
I want see the changes made in this directory.
deploy.rb
$:.unshift(File.expand_path('./lib', ENV['rvm_path'])) # Add RVM's lib directory to the load pathe
require "rvm/capistrano" # Load RVM's capistrano plugin.
require "bundler/capistrano"
set :rvm_ruby_string, 'ruby-1.9.2-p318@global'
set :rvm_type, :user
set :application, "project.com"
set :user, 'user'
set :repository, "#{user}@ip.ip.ip.ip:~/project"
set :scm, :git
set :use_sudo, false
set :keep_releases, 2
set :deploy_to, "~/#{application}"
set :deploy_via, :copy
role :web, "ip.ip.ip.ip" # Your HTTP server, Apache/etc
role :app, "ip.ip.ip.ip" # This may be the same as your `Web` server
role :db, "ip.ip.ip.ip", :primary => true # This is where Rails migrations will run
load 'deploy/assets'
What am I doing wrong?
Thank you!
Is the remote repo an actual working copy by any chance? Git wont (easily, by default) push into and update a remote working copy. You should always push to bare repos.
Edit
So, your actual repository is in
project, this is a bare repository and it is where your pushes will go. Go into this directory and dogit log, you will see your changes assuming you have your origin set correctly, etc.To get the changes into one of the working copies in
releases, you need to:git pull origin [branchname]