spacepaste

  1.  
  2. > git --version
  3. git version 1.7.12.4
  4. > git init
  5. Initialized empty Git repository in /Users/habnabit/test/git/.git/
  6. > echo A > file
  7. > git add file
  8. > git ci -m 'Add file with A'
  9. [master (root-commit) cdb6c33] Add file with A
  10. 1 file changed, 1 insertion(+)
  11. create mode 100644 file
  12. > git branch b
  13. > echo A B > file
  14. > git diff
  15. diff --git a/file b/file
  16. index f70f10e..5decc2b 100644
  17. --- a/file
  18. +++ b/file
  19. @@ -1 +1 @@
  20. -A
  21. +A B
  22. > git ca -m 'Add B to file'
  23. [master a5f9613] Add B to file
  24. 1 file changed, 1 insertion(+), 1 deletion(-)
  25. > git checkout b
  26. Switched to branch 'b'
  27. > echo 'A C' > file
  28. > git diff
  29. diff --git a/file b/file
  30. index f70f10e..bec281d 100644
  31. --- a/file
  32. +++ b/file
  33. @@ -1 +1 @@
  34. -A
  35. +A C
  36. > git ca -m 'Add C to file'
  37. [b 92e1267] Add C to file
  38. 1 file changed, 1 insertion(+), 1 deletion(-)
  39. > git checkout master
  40. Switched to branch 'master'
  41. > git merge b
  42. Auto-merging file
  43. CONFLICT (content): Merge conflict in file
  44. Recorded preimage for 'file'
  45. Automatic merge failed; fix conflicts and then commit the result.
  46. > git diff
  47. diff --cc file
  48. index 5decc2b,bec281d..0000000
  49. --- a/file
  50. +++ b/file
  51. @@@ -1,1 -1,1 +1,5 @@@
  52. ++<<<<<<< HEAD
  53. +A B
  54. ++=======
  55. + A C
  56. ++>>>>>>> b
  57. > echo 'A C' > file
  58. > git ca -m 'Merge b into master'
  59. Recorded resolution for 'file'.
  60. [master 1d3e843] Merge b into master
  61. > git log -p -SB
  62. commit a5f9613769173f649e4a4eb7fb7885648d0344bb
  63. Author: Aaron Gallagher <habnabit@gmail.com>
  64. Date: Fri Oct 19 16:53:33 2012 -0700
  65. Add B to file
  66. diff --git a/file b/file
  67. index f70f10e..5decc2b 100644
  68. --- a/file
  69. +++ b/file
  70. @@ -1 +1 @@
  71. -A
  72. +A B
  73.