Hi guys!
It's me again, after a long time. Please help me organize my Geany repository. The last time I worked on Geany it was in SVN repository, and I was using it through git-svn. Now there are two Git repositories: the main one [1] and the one containing my sm-branch [2]. I assume I should make the fork of the former and put my sm branch there, but how do I transfer my sm branch, preserving merge commits (master -> sm)?
[1]: https://github.com/geany/geany [2]: https://github.com/techee/sm-branch/
-- Best regards, Eugene.
Am 06.01.2012 16:32, schrieb Eugene Arshinov:
Hi guys!
It's me again, after a long time. Please help me organize my Geany repository. The last time I worked on Geany it was in SVN repository, and I was using it through git-svn. Now there are two Git repositories: the main one [1] and the one containing my sm-branch [2]. I assume I should make the fork of the former and put my sm branch there, but how do I transfer my sm branch, preserving merge commits (master -> sm)?
I don't think you can preserve merge commits. The history of the new git and the old git-svn repos are incomatible (e.g. the new history has proper author information) so they're meaningless anyway.
I suggest you rebase in the old repo and use patches to apply the changes to the new repo on the same revision/commit. Using 'git format-patch' and 'git am' you can preserve your non-merge commit history. Or just do 'git diff' for a single big patch,
Best regards.
Hi Thomas,
Thanks for the reply. If I can't preserve merges anyway, I'm going to transfer the sm branch right from my existing local Git repository. That is,
1. I will fork the main repository and clone it 2. add existing local repository as a remote 3. rebase the sm branch from the remote onto the corresponding commit cloned from the fork.
I guess, this should work.
-- Best regards, Eugene.
On Fri, 06 Jan 2012 16:37:05 +0100 Thomas Martitz thomas.martitz@student.htw-berlin.de wrote:
Am 06.01.2012 16:32, schrieb Eugene Arshinov:
Hi guys!
It's me again, after a long time. Please help me organize my Geany repository. The last time I worked on Geany it was in SVN repository, and I was using it through git-svn. Now there are two Git repositories: the main one [1] and the one containing my sm-branch [2]. I assume I should make the fork of the former and put my sm branch there, but how do I transfer my sm branch, preserving merge commits (master -> sm)?
I don't think you can preserve merge commits. The history of the new git and the old git-svn repos are incomatible (e.g. the new history has proper author information) so they're meaningless anyway.
I suggest you rebase in the old repo and use patches to apply the changes to the new repo on the same revision/commit. Using 'git format-patch' and 'git am' you can preserve your non-merge commit history. Or just do 'git diff' for a single big patch,
Best regards. _______________________________________________ Geany-devel mailing list Geany-devel@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
Am 06.01.2012 16:52, schrieb Eugene Arshinov:
Hi Thomas,
Thanks for the reply. If I can't preserve merges anyway, I'm going to transfer the sm branch right from my existing local Git repository. That is,
- I will fork the main repository and clone it
- add existing local repository as a remote
- rebase the sm branch from the remote onto the corresponding commit cloned from the fork.
I guess, this should work.
I dont think you can add the local repository as a remote (I am assuming that local repo is a git-svn repo from before the conversion) as the history is different. The history needs to be the same so git can reasonable tell which commits need to be rebased.
Are you saying that the sm branch in [1] is out of date and you would rather use what you have locally?
Best regards
On Fri, 06 Jan 2012 16:55:06 +0100 Thomas Martitz thomas.martitz@student.htw-berlin.de wrote:
Am 06.01.2012 16:52, schrieb Eugene Arshinov:
Hi Thomas,
Thanks for the reply. If I can't preserve merges anyway, I'm going to transfer the sm branch right from my existing local Git repository. That is,
- I will fork the main repository and clone it
- add existing local repository as a remote
- rebase the sm branch from the remote onto the corresponding
commit cloned from the fork.
I guess, this should work.
I dont think you can add the local repository as a remote (I am assuming that local repo is a git-svn repo from before the conversion) as the history is different. The history needs to be the same so git can reasonable tell which commits need to be rebased.
I'll try. I'm going to use `git rebase --onto ...` which (iiuc) does not require common history between the rebased commits. And, local repository as a remote should work well: some time ago I even managed to use a local repository as a Git submodule (for experiment only :)
Are you saying that the sm branch in [1] is out of date and you would rather use what you have locally?
The sm branch in [1] is correct. I just don't want to clone it, as I already have the same state locally, to save bandwidth (which currently costs me some $).
Best regards
Geany-devel mailing list Geany-devel@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
It seems that everything went fine.
My personal fork is https://github.com/earshinov/geany/, and the new home for sm branch is https://github.com/earshinov/geany/tree/sm.
Jiří,
I suppose you can safely remove your sm-branch repository. Thank you for keeping it for so long!
-- Best regards, Eugene.
On Fri, Jan 6, 2012 at 18:00, Eugene Arshinov earshinov@gmail.com wrote:
It seems that everything went fine.
My personal fork is https://github.com/earshinov/geany/, and the new home for sm branch is https://github.com/earshinov/geany/tree/sm.
Jiří,
I suppose you can safely remove your sm-branch repository. Thank you for keeping it for so long!
No problem, I've just removed it.
Jiri