boxmein

git cherry-pick preserves authorship

Aug 29th, 2013
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1.  
  2. C:\Users\Johannes\Desktop\tmp\gittemö>git init
  3. Initialized empty Git repository in C:/Users/Johannes/Desktop/tmp/gittemö/.git/
  4.  
  5. C:\Users\Johannes\Desktop\tmp\gittemö>notepad README
  6.  
  7. C:\Users\Johannes\Desktop\tmp\gittemö>git commit -m "asdf" --author "author #1"
  8. fatal: No existing author found with 'author #1'
  9.  
  10. C:\Users\Johannes\Desktop\tmp\gittemö>git commit -m "asdf" --author "author"
  11. fatal: No existing author found with 'author'
  12.  
  13. C:\Users\Johannes\Desktop\tmp\gittemö>git commit -m "asdf" readme.txt
  14. error: pathspec 'readme.txt' did not match any file(s) known to git.
  15.  
  16. C:\Users\Johannes\Desktop\tmp\gittemö>git add README.txt
  17.  
  18. C:\Users\Johannes\Desktop\tmp\gittemö>git commit -m "asdf" --author "Box Box <[email protected]>"
  19. [master (root-commit) 62eaf66] asdf
  20. Author: Box Box <[email protected]>
  21. 1 file changed, 2 insertions(+)
  22. create mode 100644 README.txt
  23.  
  24. C:\Users\Johannes\Desktop\tmp\gittemö>git checkout -b otherstuff
  25. Switched to a new branch 'otherstuff'
  26.  
  27. C:\Users\Johannes\Desktop\tmp\gittemö>notepad README
  28.  
  29. C:\Users\Johannes\Desktop\tmp\gittemö>git commit README.txt -m "awesome" --author "Boxmein <[email protected]>"
  30. [otherstuff 9f4978e] awesome
  31. Author: Boxmein <[email protected]>
  32. 1 file changed, 1 insertion(+)
  33.  
  34. C:\Users\Johannes\Desktop\tmp\gittemö>git checkout master
  35. Switched to branch 'master'
  36.  
  37. C:\Users\Johannes\Desktop\tmp\gittemö>git cherry-pick 9f4978e
  38. [master 0dfdf36] awesome
  39. Author: Boxmein <[email protected]>
  40. 1 file changed, 1 insertion(+)
  41. C:\Users\Johannes\Desktop\tmp\gittemö>git log
  42. commit 0dfdf36108f29c58f796b043745aab3eec29e334
  43. Author: Boxmein <[email protected]>
  44. Date: Thu Aug 29 20:19:35 2013 +0300
  45.  
  46. awesome
  47.  
  48. commit 62eaf660113744abf5c0ab3aead4ce78463133c8
  49. Author: Box Box <[email protected]>
  50. Date: Thu Aug 29 20:18:42 2013 +0300
  51.  
  52. asdf
Advertisement
Add Comment
Please, Sign In to add comment