Heroku: 'Push rejected, repository is empty' on Cloud9 IDE - heroku

I'm working on Cloud9 IDE, and I just attempted to deploy to Heroku, but I got this error:
[1/5] Verifying preconditions...
[2/5] Updating repository...
[3/5] Pushing to Heroku...
1:: Warning: Permanently added the RSA host key for IP address '50.19.85.154' to the list of known hosts.
! Push rejected, repository is empty
To git#heroku.com:anthro-site.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:anthro-site.git'
I looked around and found a few questions here that are similar, such as this one, but unfortunately the answer to that question requires me to install software, and I don't think I'm allowed to do that on Cloud9. I don't seem to have access to the heroku command, so it must not have been installed for me. How do I proceed?

Apparently you can install the Heroku client on Cloud9, as described here:
To deploy to Heroku, type the following commands:
wget http://assets.heroku.com/heroku-client/heroku-client.tgz
tar xzfv heroku-client.tgz
cd heroku-client/bin
PATH=$PATH:$PWD
Now, you can use the heroku command for your projects, as described in the Heroku documentation.
But that wasn't my problem. It seems in order to push to heroku, you must be on your master branch. The steps for me were as follows:
$ git checkout master
$ git merge dev # that's the branch I was working on
# if you don't merge, master will not have whatever
# commits you've made to the branch you were on.
$ git push --set-upstream heroku master
after that I waited for Heroku to finish installing my app, and now I can access it.

https://devcenter.heroku.com/articles/git#deploying-code
Branches pushed to Heroku other than master will be ignored by this
command. If you’re working out of another branch locally, you can
either merge to master before pushing, or specify that you want to
push your local branch to a remote master. To push a branch other than
master, use this syntax:
$ git push heroku yourbranch:master
It worked for me.

Related

using deploy terminal heroku from file to server

problem on the photo.
when i use the git push heroku master terminal allways give me this response.
i search on google but i didn't find any qestion on my language.
i follow all codes but i see this.
heroku login
$ cd my-project/
$ git init
$ heroku git:remote -a afbchatapp
and
$ git add .
$ git commit -am "make it better"
$ git push heroku master
enter code here
What language are you using?
Let's start with the problem at the beginning. Usually, Heroku tries to automatically detect the type of app you deploy by looking for certain files that act as signatures for the language you're using. So for example if it's a NodeJS app and you're deploying from Github, Heroku will look for the package.json file in the main branch. You can find the rest of the information for other files here. You may want to look at this first.
From there this solution to an almost similar problem should be able to fix the push.

git gemfury push conflicts

I'm using gemfury and git with Ruby for the first time and am having trouble doing a push to my remote gemfury repository:
git push fury master
I get an error message saying that I need to do a git pull to update my code with the latest changes.
After doing a git pull I get several conflict errors but it doesn't make sense as it's a fresh clone of the master repo. Others from my team don't seem to get the same errors when building the same package.
I've tried deleting the local repository and doing a git clone again. I've also tried doing a git reset but without any progress.
Any help or pointers would be helpful as I haven't been able to solve this issue yet and it's starting to fustrate me. Thanks!

ReadMe file won't allow me to commit and push xcode changes to github

I have an existing xcode project and repo on Github. I recently added a ReadMe file which was suggested by Github but now I can no longer commit and push changes to Github. I keep getting an out of date message. How do I fix this problem?
I had the same experience of adding README.md with the same error.
If you don't want to git pull, because the remote version in Github is outdated.
You can also force push all local branches using:
$ git push -f origin master
The following commands in the Terminal will push your local Xcode project to remote Github.
cd <drag location folder of project>
git init
git push -f origin master
You need to git pull.
If you're using the command line, navigate to the directory of the repository and run git pull. If you're using another interface, the steps may be a bit different.

Can I use gollum to create a wiki which isn't hosted by Github?

I want to create a wiki with gollum and push it to my own git repo, is that possible?
I created a new git repo, install gollum and started it. I got the "edit/Home" page. I added some content, saved...all looked good. Even the "revision history" showed that revisions occurred.
Then I stopped gollum and found there was nothing new in my git repo, I even checked if stuff hadn't been pushed...nothing. I'm not sure how/where it's storing the content that I add when I run it.
Any ideas?
Thanks
Gollum will not sync with a git remote. It will never perform git pull or git push. You must have gollum running on the remote server, or you must manually run git push on machines where you make edits, and git pull on machines who also want to see the wiki. This could be part of a cron job if you're running locally.
It is much easier to have the gollum process running on your web server. See below for more information:
http://www.nomachetejuggling.com/2012/05/15/personal-wiki-using-github-and-gollum-on-os-x/#toc-synchronization-with-github
May be you are checking a wrong repository, the default is for gollum to use or create a git repository at the root of page files. It can be changed with the options --page-file-dir and --base-path (cf gollum --help)

not able to push to heroku

I am a complete new bie to heroku
I just installed heroku toolbar and performed the below operation
$ heroku create
Creating pure-oasis-4419... done, stack is cedar
http://pure-oasis-4419.herokuapp.com/ | git#heroku.com:pure-oasis-4419.git
$ heroku create --stack cedar
Creating mighty-stream-7975... done, stack is cedar
http://mighty-stream-7975.herokuapp.com/ | git#heroku.com:mighty-stream-7975.git
$ git push heroku master
fatal: I don't handle protocol 'git#heroku.com:https'
Can any one please tell me why i am getting this error.
I also tried
git remote -v
Still I get
fatal: I don't handle protocol 'git#heroku.com:https'
I am sure i have a mistake somewhere. Could any one help me with this.
git pull the source code to your device.
start working on the code. Or just rewrite them with yours.
git add .
git commit -m "commit message"
git push
It's maybe because of your Git version. Try using the latest one as advised in older question git error: cannot handle https

Resources