merging psrrefs files

If you have a modrefs.bib file that contains many changes made since the CVS repository on SourceForge was made readonly, then follow this recipe to merge your changes
  1. If you haven't already, then clone the psrrefs repository. (In the first step, replace "USER" with your username on SourceForge.)
    
    git clone ssh://USER@git.code.sf.net/p/psrrefs/bib psrrefs
    cd psrrefs
    
    
  2. Create a branch that forks at the point where the readonly CVS repository was imported to Git; e.g.
    
    git checkout -b mybranch cvsimport
    
    
  3. Copy your version of modrefs.bib from your local copy of the CVS repository into the present working directory. To avoid having to clean up a large number of merge conflicts, run
    
    perl -pi -e 's/@ARTICLE/@article/g' modrefs.bib
    
    
  4. Commit your changes to modrefs.bib; e.g.
    
    git commit -m "many changes made since 2016" modrefs.bib
    
    
  5. Switch back to the master branch and merge your branch into it.
    
    git checkout master
    git merge mybranch
    
    
  6. If you see the following message
    
    Auto-merging modrefs.bib
    CONFLICT (content): Merge conflict in modrefs.bib
    Automatic merge failed; fix conflicts and then commit the result.
    
    then you'll need to fix the conflicts:

    1. edit modrefs.bib and fix the conflicts (look for <<<<)
    2. commit the fixes with the following commands (customize the log message as you see fit)
      
      git add modrefs.bib
      git commit -m "log message; e.g. conflicts fixed after merging branch"
      
  7. When satisfied with your merge, delete the branch (it's no longer needed) and push your changes to SourceForge; e.g.
    
    git branch -d mybranch
    git push