Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 1st, 2012  |  syntax: None  |  size: 0.47 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Git - retroactively patching a file that will be copied
  2. % git branch before-cp
  3. % cp original.script modified.script
  4. % git add modified.script
  5. % git commit -m "creating a copy to modify"
  6. % vim modified.script #...
  7. % git add modified.script
  8. % git commit -m "made some modifications"
  9.        
  10. % git checkout before-cp
  11. % vim original.script #...
  12. % git add original.script
  13. % git commit -m "fixing a bug in original before I start copying it"
  14. % git checkout master
  15. % git rebase before-cp