How do I reset a Heroku git repository to its initial state?
I have got a web application within a git repository. Due to historic reasons the web application is not at the root of the repository, it is within a folder called
website. Beside that there are some other folders, so that I have got the following structure:
The website is run on Heroku. As Heroku demands that your web application is at the root of a git repository, until now I used a build process which copied the
website folder to a completely different (external) folder with its own git repository. Then I was able to push from there to Heroku and everything was fine.
Now, since git includes the
subtree command this is not necessary any longer, as I could directly push from my initial folder, but just the
website sub-folder, using:
git subtree push --prefix=website heroku master
Basically, this works perfectly. I only have one problem: As the previous commits to Heroku came from a completely different git repository, the history of both doesn't match each other - so Heroku detects a non-fast-forward push, and rejects the
So how do I deal with this?
- Idea 1: Force push. Tried that, but doesn't work as
git subtree push does not have a
--force option (or anything similar).
- Idea 2: Clear Heroku's repository and start from scratch again.
I'd love to go with idea 2, but I have no idea of how to achieve this.
My first approach was to run a
git push heroku :master, but Heroku detects this and denies it.
Of course, I could destroy the app and recreate it, but then all domain assignments and add-ons are gone as well, and I'd like to avoid that.
Any other ideas?
Thanks for looking. I have no doubt I probably used the wrong terminology in my question so let me just explain the problem: Developer A checks code into GIT. Later, Developer B checks code into GIT
Do you know if there is a way to bring back malloc in its initial state, as if the program was just starting ? reason : I am developing an embedded application with the nintendods devkitpro and I woul
I am not sure how to get the mongodb version # that is running on heroku?
I am beginner in using git versioning tool. I would like to download repository state (files) at specified time (e.g. on 5.10.2013). How can I do that ?
I have a project that I've been working on called system that I set up as a repo. I've been pulling and pushing to the project (system.git). Now I want to publish it to a site like github. What is t
I'm using git-svn to track an svn repository with several branches. One of the server branches I've been working with has been renamed in the svn repository. Git-svn doesn't seem to understand what's
First, I create new keys using ssh-keygen -t rsa -C email@example.com Then I add the generated key to heroku by heroku keys:add. After that, I tried to push my git repository to heroku using git push h
I found this partially on http://www.haskell.org/haskellwiki/State_Monad but it is not clear to me how I would define the initial state of c and f. It works with IORefs though but I do not need global
When I run git remote -v from Terminal I get the following: heroku firstname.lastname@example.org:obscure-taiga-9581.git (fetch) heroku email@example.com:obscure-taiga-9581.git (push) origin http://coastguard-quiz.her
I am using Rails 3.2.6 and Ruby 1.9.3. I have created application and I have push that application at GitHub repository by using git push. When I deploy application at Heroku by using git push heroku
I want to create a git repository and allow all users to have access to it. I tried initializing it by: git init --shared=all However when I change the user and do a git status, I get the following e
I would like to change the directory name of a git submodule in my git superproject. Lets suppose I have the following entry in my .gitmodules file: [submodule .emacs.d/vimpulse] path = .emacs.d/vim
I have a file in my git repository which sometimes receives bug fixes in another git repository. I would like to be able to pull those commits into my repo. For example: project_a/ /.git /src/somefile
Its a silly question but here you go: I want to open this git repository from source forge but i dont know how to open this link: git clone http://git.code.sf.net/p/tidirectlink/code tidirectlink-code
Taking into consideration that there are several git commands that make no sense in a bare repository (because bare repositories don't use indexes and do not have a working directory), git reset --ha
I've got an iPhone application, and I'd like it to reset its state every time the user leaves it, i.e. the home button is pressed. By reset its state I mean that the application should start as if i
I'm new to git and trying to figure out the best way to copy an existing GitHub.com repository owned by another user to a private git server I have on Atlassian Stash. Ideally we could do a copy at le
I have a github-based git repository that represents development up to a certain point, and then a svn repository, not initialized with git svn, that has further development. I want to bring the svn c
Authlogic has a couple unfortunate deprecation warnings that are fixed in a fork. How do I use this forked version? I tried adding the following to my Gemfile: gem 'authlogic', :git => 'git://githu
Situation: Edit files Add files to the index Edit more files Now we have three different states. The state of HEAD, the state of the index and the state of the working tree. What is the command to u
I have a full checkout of svn repository in a folder. But I don't have the credentials of the svn repository(hosted in Unfuddle). I want to move this folder to a new git repostitory ( Github) with all
I have a TFS 2013 server setup in a windows active directory domain that hosts a git repository team project called TestGit2. Windows clients are able to communicate with it just fine through visual
I have git version 18.104.22.168. and would like to upgrade to the latest stable release of 1.8.4. So I tried sudo apt-get install git as it says on the git downloads page for Linux but I get this result:
It should be simple, but i just cant get anything to work. My Mac mini was connected to the office network (Windows server) and the repository is located on a server harddisk. I have a cloned working
I have a repository. (git init) I've done check-ins and commits and logs and stuff. But, how can I remove all traces of git and delete git off this directory (and subdirectories)? I'm on Ubuntu.
i did not clone this repository, I did repo init -u http:// repository_name/manifest.git 3 months ago. I was still learning different things as a beginner. The user who's repo i used has since deleted
In my sidekiq dashboard, I see on the left a box with the counters Processed 168 Failed 111 Busy 0 Scheduled 0 Retries 0 Enqueued 0 How do I reset them all to 0?
I'm working with a state machine workflow and using the ExternalDataExchange service to handle events in the host and get data into the workflow via eventargs. However, now I need to get data out of t
I know that there are closely related question to mine but they did not help me. I'm learning the whole rails, gem, git, heroku concept and liking it a lot. When I issued heroku command line actions (
The problem is the following: how to fetch a few files from a previous commit in git? I could get the files one by one and replace them by their old version: git show <commit>:<path> >!
This question already has an answer here: Undoing a git reset --hard HEAD~1 9 answers I made a terrible mistake and execute git reset --hard HEAD, all day's the local modification lost, how c
I have a Azure Web Site that is linked with a Git Repository (in the deployments tab). How can I remove the repository and the link ? (I want to set up TFS deployment)
I use a git repository at work on GitHub. I know the basic commands for navigating and editing a repository but I don't know how to set one up from scratch. I would like to setup my own server for the
I would like to replicate my local git repository, (recently converted from svn), into my empty github account. I do not want to show every detailed commit, but rather larger aggregated changesets cor
I used reposurgeon to convert ma svn into a git repository here: (How do I convert an svn repo to git using reposurgeon?). It seems like it converted all tags to annotated tags. How can I change tha
This question already has an answer here: How to fully delete a git repository created with init? 6 answers I can't find the command. I tried Googling git 'delete a repository'.
I have some local changes (not in separate files so .gitignore doesn't work) that I don't want to commit. I do git reset --hard sometimes after commit to clear occasional changes but obiously I also l
I am trying to maintain a bare copy of a Git repository and having some issues keeping the remote tracking branches up to date. I create the remote tracking branches like this: git branch -t 0.1 origi
My app looks really nice on my computer. I add it to a repo git add ., git commit -m 'create app' and push this repo up to heroku with git push heroku master. It looks identical to my local repository
I have a main bare repository and a personal bare repository. I want to update changes form main to personal, so I run: $ git pull fatal: /home/gimenero/applib/git/libexec/git-core/git-pull ca
I have a .gitignore file in my project directory and I placed the following entry in the file to not to commit the files in the following folder: EStudyMongoDb.Integration.Test\ For some reason Git
If I put initialize a bare repository to a network drive and push and pull from it, is there a way for me to allow others to clone the repo, but not push back to the master branch ? I would like to re
I made a mistake today and performed a chmod 0644 in my git repository and soon I started getting permission errors. I had to chmod the .git directory to 0777 before I could use the repository again.
I'm trying to write a git deployment script, but the script has to update several servers and they aren't all on the same Git branch. Ideally the script should need just one command, to the effect of
Mistakenly, i hard reset my git repository. By doing this all the changes that i have made has been gone. Now, i want to rollback Git to all the uncommitted changes. Please help me with this.
I wonder for Heroku, when git push heroku master is used, the code is pushed to heroku, but what does heroku and master indicate? How does git know where to push to? (the git path) Also, I didn't kno
When I set : animationSet.setFillAfter(true); The view holds the animated state there after. But before doing another animation, I need to reset the state to the old one. What I need is something li
In this repository (https://github.com/LaravelIO/laravel.io), you can have a look at vagrant-chef folder. When you click on it, you move to another repository. How can I do that?
I want to get a list of the latest commits on a certain remote Git repository. However, I do not want to create a clone because that takes too long. With SVN, I can simply pass along a username and pa
I'm working on a repository I forked in which the author took the dirty path and stuffed all his dependencies in the lib/ directory in the initial commit. Normally, if it wasn't the initial commit, I