Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ git log
- commit 5c4a8e76f951eb7ee157f4136257f6666fddf1d1
- Author: John Doe <johndoe@gmail.com>
- Date: Sun Aug 28 14:40:30 2016 +0300
- Changed 1.txt
- commit 7f2ad8c26ad032800c049d0d6122c43410a5cbbc
- Author: John Doe <johndoe@gmail.com>
- Date: Sun Aug 28 14:39:30 2016 +0300
- Initial commit
- $ git status
- On branch master
- Untracked files:
- (use "git add <file>..." to include in what will be committed)
- test.txt
- $ git add --all
- $ git status
- On branch master
- Changes to be committed:
- (use "git reset HEAD <file>..." to unstage)
- new file: test.txt
- $ git commit -m 'Added test' --amend
- [master aad3e76] Added test
- Date: Sun Aug 28 14:40:30 2016 +0300
- 2 files changed, 2 insertions(+), 1 deletion(-)
- create mode 100644 test.txt
- $ git log --stat
- commit aad3e7653cd76c4afa1a9272bd421493b4e3055c
- Author: John Doe <johndoe@gmail.com>
- Date: Sun Aug 28 14:40:30 2016 +0300
- Added test
- 1.txt | 3 ++-
- test.txt | 0
- 2 files changed, 2 insertions(+), 1 deletion(-)
- commit 7f2ad8c26ad032800c049d0d6122c43410a5cbbc
- Author: John Doe <johndoe@gmail.com>
- Date: Sun Aug 28 14:39:30 2016 +0300
- Initial commit
- 1.txt | 1 +
- 1 file changed, 1 insertion(+)
- [ak@hostname testfolder]$ git rebase -i HEAD~2
- pick 7921448 Commit A
- pick 8a84e59 Commit B
- # Rebase ce97832..8a84e59 onto ce97832
- #
- # Commands:
- # p, pick = use commit
- # r, reword = use commit, but edit the commit message
- # e, edit = use commit, but stop for amending
- # s, squash = use commit, but meld into previous commit
- # f, fixup = like "squash", but discard this commit's log message
- # x, exec = run command (the rest of the line) using shell
- #
- # These lines can be re-ordered; they are executed from top to bottom.
- #
- # If you remove a line here THAT COMMIT WILL BE LOST.
- #
- # However, if you remove everything, the rebase will be aborted.
- #
- # Note that empty commits are commented out
- ~
- ~
- ~
- "~/testfolder/.git/rebase-merge/git-rebase-todo" 20L, 650C
- pick 7921448 Commit A
- s 8a84e59 Commit B
- Rebasing (2/2)
- # This is a combination of 2 commits.
- # The first commit's message is:
- Commit A
- # This is the 2nd commit message:
- Commit B
- # Please enter the commit message for your changes. Lines starting
- # with '#' will be ignored, and an empty message aborts the commit.
- # HEAD detached at 7921448
- # You are currently editing a commit while rebasing branch 'master' on 'ce97832'.
- #
- # Changes to be committed:
- # (use "git reset HEAD^1 <file>..." to unstage)
- #
- # new file: file2
- # new file: file3
- #
- ~
- ~
- ".git/COMMIT_EDITMSG" 20L, 494C
Add Comment
Please, Sign In to add comment