user677982
user677982

Reputation: 43

problems with git and heroku

I'm having a double problem: one with the git: how do I remove all the .rb ~ files? and another one with the heroku: how do I do a push to a specific url? for example, I have this http://morning-day-54.heroku.com but I do git push heroku master and there is no change in this url.

Upvotes: 0

Views: 531

Answers (2)

Mark Longair
Mark Longair

Reputation: 467033

To stage the removal of one of those files for the next commit, you could do:

git rm foo.rb~

.... or to stage the removal of many such backup files in a single directory, you could do:

git rm *~

To stage the removal of all backup files in the repository, you should use find and xargs - for example:

find . -name '*~' -print0 | xargs -0 git rm

After you've staged all the removals, you should commit that with:

git commit -m "Remove all backup files"

... and to stop them being tracked in the future, add them to your .gitignore, for example:

echo '*~' >> .gitignore
git add .gitignore
git commit -m "Ignore all backup files"

On your Heroku question, there's really not enough information for someone to be able to work out what's going wrong. Since that's really a separate issue, I'd suggest that you start a new question for that, but make sure that you list exactly the commands you're trying and any errors that you get.

Upvotes: 2

Nick Barrett
Nick Barrett

Reputation: 1051

Using git remove you should be able to remove files from the repo.

Also heroku urls are randomly generated, you cant choose them unless you use the custom domain addon.

Upvotes: 0

Related Questions