Guest User

Untitled

a guest
Aug 28th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.53 KB | None | 0 0
  1. $ git log
  2.  
  3. commit 5c4a8e76f951eb7ee157f4136257f6666fddf1d1
  4. Author: John Doe <johndoe@gmail.com>
  5. Date: Sun Aug 28 14:40:30 2016 +0300
  6.  
  7. Changed 1.txt
  8.  
  9. commit 7f2ad8c26ad032800c049d0d6122c43410a5cbbc
  10. Author: John Doe <johndoe@gmail.com>
  11. Date: Sun Aug 28 14:39:30 2016 +0300
  12.  
  13. Initial commit
  14.  
  15. $ git status
  16.  
  17. On branch master
  18. Untracked files:
  19. (use "git add <file>..." to include in what will be committed)
  20. test.txt
  21.  
  22. $ git add --all
  23.  
  24. $ git status
  25.  
  26. On branch master
  27. Changes to be committed:
  28. (use "git reset HEAD <file>..." to unstage)
  29. new file: test.txt
  30.  
  31. $ git commit -m 'Added test' --amend
  32.  
  33. [master aad3e76] Added test
  34. Date: Sun Aug 28 14:40:30 2016 +0300
  35. 2 files changed, 2 insertions(+), 1 deletion(-)
  36. create mode 100644 test.txt
  37.  
  38. $ git log --stat
  39. commit aad3e7653cd76c4afa1a9272bd421493b4e3055c
  40. Author: John Doe <johndoe@gmail.com>
  41. Date: Sun Aug 28 14:40:30 2016 +0300
  42.  
  43. Added test
  44.  
  45. 1.txt | 3 ++-
  46. test.txt | 0
  47. 2 files changed, 2 insertions(+), 1 deletion(-)
  48.  
  49. commit 7f2ad8c26ad032800c049d0d6122c43410a5cbbc
  50. Author: John Doe <johndoe@gmail.com>
  51. Date: Sun Aug 28 14:39:30 2016 +0300
  52.  
  53. Initial commit
  54.  
  55. 1.txt | 1 +
  56. 1 file changed, 1 insertion(+)
  57.  
  58. [ak@hostname testfolder]$ git rebase -i HEAD~2
  59. pick 7921448 Commit A
  60. pick 8a84e59 Commit B
  61.  
  62. # Rebase ce97832..8a84e59 onto ce97832
  63. #
  64. # Commands:
  65. # p, pick = use commit
  66. # r, reword = use commit, but edit the commit message
  67. # e, edit = use commit, but stop for amending
  68. # s, squash = use commit, but meld into previous commit
  69. # f, fixup = like "squash", but discard this commit's log message
  70. # x, exec = run command (the rest of the line) using shell
  71. #
  72. # These lines can be re-ordered; they are executed from top to bottom.
  73. #
  74. # If you remove a line here THAT COMMIT WILL BE LOST.
  75. #
  76. # However, if you remove everything, the rebase will be aborted.
  77. #
  78. # Note that empty commits are commented out
  79. ~
  80. ~
  81. ~
  82. "~/testfolder/.git/rebase-merge/git-rebase-todo" 20L, 650C
  83.  
  84. pick 7921448 Commit A
  85. s 8a84e59 Commit B
  86.  
  87. Rebasing (2/2)
  88. # This is a combination of 2 commits.
  89. # The first commit's message is:
  90.  
  91. Commit A
  92.  
  93. # This is the 2nd commit message:
  94.  
  95. Commit B
  96.  
  97. # Please enter the commit message for your changes. Lines starting
  98. # with '#' will be ignored, and an empty message aborts the commit.
  99. # HEAD detached at 7921448
  100. # You are currently editing a commit while rebasing branch 'master' on 'ce97832'.
  101. #
  102. # Changes to be committed:
  103. # (use "git reset HEAD^1 <file>..." to unstage)
  104. #
  105. # new file: file2
  106. # new file: file3
  107. #
  108. ~
  109. ~
  110. ".git/COMMIT_EDITMSG" 20L, 494C
Add Comment
Please, Sign In to add comment