Postgres-XC Wiki
Register
Advertisement

How to recover sourceforge repository[]

When it is needed[]

There will be a slight chance that committers make mistakes to include bad or inappropriate commits to the master branch of original sourceforge repository.  If it is not on the master, it is quite easy.   Just remove it from the origin too, by "git push orign :branch" command.    In the case of master, you must be a bit careful and there's some more to do.

It is not a good idea to make "conpensating" commits because it makes commit log extremely un-readable incomprehensible.   So here's how.   Please note that only committers can do this and this has to be done very very carefully.

Some of the following steps may be unnecessary or can be improved much.   It was written based on Koichi's experience.   Any improvement/comments are welcome.

1. Log in to sourceforge site.[]

You can do this like:

$ ssh -t who,postgres-xc@shell.sourceforge.net create

Then you will be prompted for your password.   After then, you will find a couple of symbolic links to project files.   postgres-xc will hold several project files.   postgres-xc/postgres-xc is the origin of our git repository.

2. Create a backup of the whole repository.[]

You should meka a backup before you do any work directly to this repository.   You may use tar or any other backup command available.

3. Create new master[]

Create new_master (or whatever name you like) branch from the master.   Can be done remotely at sourceforge site or locally at your working branch and push it to the origin, but better to do it directly at sourceforge site.

4. Rename master to old_master[]

5. Rename new_master to master.[]

6. Hard-reset unneeded commits[]

This has to be done locally, using "git reset --hard commit" command.  You should push this after you are sure the master is correct.

7. Edit HEAD file[]

HEAD file will be at the home directory of the repo.   This file points to what is the current "HEAD" in the repo.   At this point this is old_master.   You should edit this to "master" to remove old_master.

8. Remove old_master[]

Advertisement