I was following this guide Nitrous to Heroku Guide
It describes the process to fork a git repo but I want to push my directory of stuff to Git and then to Heroku. Well I really wanted to just push my stuff to Heroku. Argghh now I am lost.
So either push directly to Heroku or to Git and then on to Heroku.
Tutorial links always welcome if I have missed something.
Thanks in advance. :)
You will need to add two remotes within the same project.
Initiate your project for Git
$ git init
To add Github remote to your project and push:
$ git remote add origin https://github.com/user/repo.git
# Set a new remote
$ git remote -v
# Verify new remote
# origin https://github.com/user/repo.git (fetch)
# origin https://github.com/user/repo.git (push)
$ git add .
$ git commit -m "initial commit"
$ git push origin master
To create a new Heroku project and push the remote to your project:
$ heroku create
$ git remote -v
# Verify new remote (you will see heroku and origin now
# heroku git#heroku.com:falling-wind-1624.git (fetch)
# heroku git#heroku.com:falling-wind-1624.git (push)
# origin https://github.com/user/repo.git (fetch)
# origin https://github.com/user/repo.git (push)
$ git push heroku master
This is a standard strategy which you will everytime want to git add, commit, and then push to both origin master (Github) and heroku master (Heroku).
If you have local data on your Nitrous Box, which isn't yet a git repo, what you need to do is:
cd /path/to/stuff
git init
git add .
git commit -m "Make stuff into a git repo"
From there, you can follow the steps described in the tutorial you mention in your question, except for step 7: you don't need to clone a repo, since you just created one.
Related
When I added a gem to my app's Gemfile, committed the changes, and attempted to git push heroku master, it simply told me all the changes were up-to-date, via the message below.
$ git push heroku master
Everything up-to-date
How can I go about diagnosing this problem? thank you.
Try to the following:
git push heroku heroku:master
I am new on Ruby/Rails application development. I already love Ruby/Rails because it's easy to learn. I've built an Rails application and i try to deploy on Heroku.
When i type :
heroku create
Creating app... done, stack is cedar-14
https://aqueous-plateau-17182.herokuapp.com/ | https://git.heroku.com/aqueous-plateau-17182.git
I don't have the following message :
Git remote heroku added
I think there is a problem with my remote :
git remote -v
heroku git#bitbucket.org:pracede/hubapp.git (fetch)
heroku git#bitbucket.org:pracede/hubapp.git (push)
origin git#bitbucket.org:pracede/hubapp.git (fetch)
origin git#bitbucket.org:pracede/hubapp.git (push)
git config --list | grep heroku
remote.heroku.url=git#bitbucket.org:pracede/hubapp.git
remote.heroku.fetch=+refs/heads/*:refs/remotes/heroku/*
1.There are remote but heroku refers to bitbucket. Is it correct ?
If no correct, how to do, please ?
I cannot deploy. I have the following message :
git push heroku master
Everything up-to-date
My rails application is not alive. Is someone could explain me, please ?
Thanks
First delete the current remote heroku reference(i.e pointing to bitbucket remote ) with -
git remote rm heroku
Add then add heroku remote to your repo -
git remote add heroku git#heroku.com:aqueous-plateau-17182.git
Hope this helps!
I haven't been able to get Heroku to update my app for some reason. This is the first app I've had problems with this happening. I've tried a couple different methods, but everything I've tried just says in the command "everything is up to date." and when I check heroku, it's just an early version of my app. Any idea why it won't update on Heroku?
Here is what I've tried:
$ bundle exec rake test
$ git add -A
$ git commit -m "..."
$ git checkout master
$ git merge blah
$ bundle exec rake test
$ git push
$ git push heroku
$ heroku run rake db:migrate
and I've also tried this as well:
$ git status
$ git add .
$ git commit -m "..."
$ git push heroku master
$ heroku run db:migrate
Heres the git status:
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
Here's trying to force it
$ git push heroku master --force
Everything up-to-date
Here's with git remote -v
heroku https://git.heroku.com/stupidapp1.git (fetch)
heroku https://git.heroku.com/stupidapp1.git (push)
origin https://github.com/Tyrantt47/stupidapp1.git (fetch)
origin https://github.com/Tyrantt47/stupidapp1.git (push)
Curtis, I feel like this answer could be judged as the antithesis of a good dev, but if you have the code you want to deploy checked into version control and locally, why not just push it to a new Heroku app.
If the name of the repository is any indication of the scale of the application, I would say try it and see the results.
Heroku provides good documentation on migrating a database from one app to another and its add-on services are easy to get setup, if either one of those are a concern.
Food for thought...
I think that the syntax is
git push -f heroku master
After I run create 'Git remote heroku added' will not appear, and I cannot push the code to gitHub. Any advice?
Do you mean?:
git remote add heroku [some url]
There's no such command:
Git remote heroku added
My git console:
Home#PC /c/rails/konkurranceportalen (master)
$ git push heroku master
Enter passphrase for key '/c/Users/Home/.ssh/id_rsa':
! No such app as warm-spring-423
fatal: The remote end hung up unexpectedly
Home#PC /c/rails/konkurranceportalen (master)
I have created a app named "vinderhimlen" that I want to push my rails app to
you need to change your remote heroku (if you typed git remote -v youd still see warm-spring-423) try something like this:
git remote rm heroku
git remote add heroku git#heroku.com:vinderhimlen.git