[git-users] Re: How to migrate to git from two SVN repositories?
Well, that's the kind of pearls git contains and I still have to discover. Thanks. On Sep 7, 4:45 am, David Aguilar dav...@gmail.com wrote: On 9/6/10, Mark Kharitonov mark.kharito...@gmail.com wrote: @Rouleau: Thanks for the reply. Nope. I have two SVN repositories, where: - the first repository is the repository before the old VCS crashed. - the second repository contains all the dev code since the crash with the history starting from the crash day onwards. I wish to have a single GIT repository containing the merge of the two SVN repositories, so that the crash incident does not manifest itself in anyway. In other words, if a file is present in two SVN repositories, then it has two distinct histories - the one from its creation until the crash (in the first repo) and the other - from the crash until now (in the new repo). I want this file to have a single history in the GIT, which is from its creation until now. You should read up on grafts in git. http://stackoverflow.com/questions/161928/what-are-git-info-grafts-forhttps://git.wiki.kernel.org/index.php/GraftPoint Merge in git parlance means something different then how you are using it, which may be part of the confusion. Once you've grafted the histories together you should be able to filter-branch the graft point away. The basic idea is to start from two separate git repositories. Go into the one with the post-crash history and graft the initial commit so that its parent is the last commit from the pre-crash history. Once the graft is setup you can use filter-branch to make the graft permanent. In order to have the pre-crash history available in the post-crash repo you'll need to add it as a remote to your post-crash repo. git remote add old path/to/pre-crash git fetch old The pre-crash SHA1s will then become available from your post-crash repo. 'git branch -a' will show its branches, etc. On Sep 5, 6:31 pm, P Rouleau proulea...@gmail.com wrote: I'm not an expert, but it looks like you now have two branches in SVN and you want to merge them back, but in git instead. And the hardest step will be finding the time to do it... I understand you want to keep the pre-crash history and the post-crash one too. I suggest these steps (look at the doc for the options' description): 1. git svn clone [-s] -A {authors.lst} svn://pre-crash-svn mergeCrash 2. git svn clone [-s] -A {authors.lst} svn://post-crash-svn postCrash 3. cd mergeCrash 4. git remote add postCrash ../postCrash 5. git fetch [--tags] postCrash master 6. git merge postCrash/master I don't think this is what we are trying to accomplish. On Sep 5, 3:42 am, Mark Kharitonov mark.kharito...@gmail.com wrote: Dear ladies and sirs. We use SVN as our VCS, but wish to migrate to git. All is good, but a few months ago our SVN server had a serious RAID problems (so much that it became unusable) plus at the same day no IT person was available to restore the repository from the backups. So, we have setup a temporary SVN server on a certain workstation from the most recent version that we had. The net result is: 1. We have a few months of work on the temporary SVN server (the revisions there start from 1, of course) 2. There is a new VCS server machine with the pre-crash SVN repository restored there, but no one uses it yet, because someone has to merge the temporary repository there somehow and no one has the time. 3. In addition, we want to migrate to git, because SVN is just too much pain to work with - merges are killing us. Can anyone advice on the best process to end up with a git repository, which would contain the old SVN repository merged with the temporary one? BTW, the new VCS server is a linux machine. Thanks a lot in advance. -- David -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-us...@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
[git-users] Re: How to migrate to git from two SVN repositories?
Well, that's the kind of pearls git contains and I still have to discover. Thanks. On Sep 7, 4:45 am, David Aguilar dav...@gmail.com wrote: On 9/6/10, Mark Kharitonov mark.kharito...@gmail.com wrote: @Rouleau: Thanks for the reply. Nope. I have two SVN repositories, where: - the first repository is the repository before the old VCS crashed. - the second repository contains all the dev code since the crash with the history starting from the crash day onwards. I wish to have a single GIT repository containing the merge of the two SVN repositories, so that the crash incident does not manifest itself in anyway. In other words, if a file is present in two SVN repositories, then it has two distinct histories - the one from its creation until the crash (in the first repo) and the other - from the crash until now (in the new repo). I want this file to have a single history in the GIT, which is from its creation until now. You should read up on grafts in git. http://stackoverflow.com/questions/161928/what-are-git-info-grafts-forhttps://git.wiki.kernel.org/index.php/GraftPoint Merge in git parlance means something different then how you are using it, which may be part of the confusion. Once you've grafted the histories together you should be able to filter-branch the graft point away. The basic idea is to start from two separate git repositories. Go into the one with the post-crash history and graft the initial commit so that its parent is the last commit from the pre-crash history. Once the graft is setup you can use filter-branch to make the graft permanent. In order to have the pre-crash history available in the post-crash repo you'll need to add it as a remote to your post-crash repo. git remote add old path/to/pre-crash git fetch old The pre-crash SHA1s will then become available from your post-crash repo. 'git branch -a' will show its branches, etc. On Sep 5, 6:31 pm, P Rouleau proulea...@gmail.com wrote: I'm not an expert, but it looks like you now have two branches in SVN and you want to merge them back, but in git instead. And the hardest step will be finding the time to do it... I understand you want to keep the pre-crash history and the post-crash one too. I suggest these steps (look at the doc for the options' description): 1. git svn clone [-s] -A {authors.lst} svn://pre-crash-svn mergeCrash 2. git svn clone [-s] -A {authors.lst} svn://post-crash-svn postCrash 3. cd mergeCrash 4. git remote add postCrash ../postCrash 5. git fetch [--tags] postCrash master 6. git merge postCrash/master I don't think this is what we are trying to accomplish. On Sep 5, 3:42 am, Mark Kharitonov mark.kharito...@gmail.com wrote: Dear ladies and sirs. We use SVN as our VCS, but wish to migrate to git. All is good, but a few months ago our SVN server had a serious RAID problems (so much that it became unusable) plus at the same day no IT person was available to restore the repository from the backups. So, we have setup a temporary SVN server on a certain workstation from the most recent version that we had. The net result is: 1. We have a few months of work on the temporary SVN server (the revisions there start from 1, of course) 2. There is a new VCS server machine with the pre-crash SVN repository restored there, but no one uses it yet, because someone has to merge the temporary repository there somehow and no one has the time. 3. In addition, we want to migrate to git, because SVN is just too much pain to work with - merges are killing us. Can anyone advice on the best process to end up with a git repository, which would contain the old SVN repository merged with the temporary one? BTW, the new VCS server is a linux machine. Thanks a lot in advance. -- David -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-us...@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
[git-users] Disappearing file
I have two branches, master and working. The .gitignore file has this entry: config/database.yml When I checkout working I see this: -rw-rw-r-- 1 x y 1196 Sep 8 09:23 config/database.yml When I co master I see this: ls: config/database.yml: No such file or directory If I add config/database.yml while in master and switch to working and then back again the file disappears. Evidently I have done something to git that causes it to remove the file whenever the master branch is switched but I cannot fathom what that could be. Does anyone have any ideas what this might be and how to correct it? -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-us...@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] problem while cloning....
On Wed, Sep 8, 2010 at 9:48 AM, Sahil Arora sahilarora...@gmail.com wrote: when i try to clone a repository the following output comes sa...@sahil-laptop:~/sample$ git clone git:// git.kernel.org/pub/scm/git/git.git Cloning into git... nc: read failed (0/3): Broken pipe fatal: The remote end hung up unexpectedly I am behind a proxy server. Please help if anyone knows how to solve... http://rip747.wordpress.com/2008/09/12/git-clone-over-http-who-knew/ looks like you just need to export an environment variable and use http:// instead of git:// You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-us...@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.comgit-users%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/git-users?hl=en. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-us...@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] problem while cloning....
I have already done this ...but this doesnot help.. On Wed, Sep 8, 2010 at 10:05 AM, Jeremiah Dodds jeremiah.do...@gmail.comwrote: On Wed, Sep 8, 2010 at 9:48 AM, Sahil Arora sahilarora...@gmail.comwrote: when i try to clone a repository the following output comes sa...@sahil-laptop:~/sample$ git clone git:// git.kernel.org/pub/scm/git/git.git Cloning into git... nc: read failed (0/3): Broken pipe fatal: The remote end hung up unexpectedly I am behind a proxy server. Please help if anyone knows how to solve... http://rip747.wordpress.com/2008/09/12/git-clone-over-http-who-knew/ looks like you just need to export an environment variable and use http://instead of git:// You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-us...@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.comgit-users%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/git-users?hl=en. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-us...@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.comgit-users%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/git-users?hl=en. -- Sahil Arora B.Tech 2nd year Computer Science and Engineering IIT Delhi Contact No: +91 9871491046 -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-us...@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.