Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 3

Subversion/git-github troubles

Solved! Go to Solution.

Hello,

 

I use github as a final publication point for a subversion repository.  In the past, this has gone well.  I'm familiar with how to create and maintain a git repo that mirrors the changes checked into subversion. 

My troubles started, however, when the subversion repo had to be restored from backups, making the github.com repo one (1) check-in ahead of the existing subversion repo.  

Since then, I've had to add a step where I update my local git repo from subversion, then merge changes from github, and finally push all changes to github.  This is not going to work forever.  I see two solutions, neither of which I know how to do:

1. Figure out how to get the change in github merged back down to the subversion repo in a way that github will recognize.

2. Rebuild my github repo from scratch using a prestine version from the head of subversion, without losing all the meta-data, follows, etc attached to my existing github repo.

I know, it's complicated.  Any help is appreciated.

2 Replies
Highlighted
Solution
Community Manager
Message 2 of 3

Re: Subversion/git-github troubles

Since you're already pulling in changes from subversion and the GitHub-based git repository, then you should be able to do the following:

 

  1. Bring in the latest changes from subversion to your local git repository
  2. Use a "force push" to tell the GitHub-based repository to use exactly what you have locally, thereby dropping the "one commit ahead"

 

You can do this by using `git push --force` instead of `git push`.

 

WARNING: A force push is a potentially destructive action.

 

But you want to destroy the one extra commit, so it s

Copilot Lvl 2
Message 3 of 3

Re: Subversion/git-github troubles

Thank you very much lee-dohm!