Skip to content

Instantly share code, notes, and snippets.

@arianitu
Created May 20, 2016 20:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arianitu/a05a10f73dffc0f37d5c2d4b8cebfc80 to your computer and use it in GitHub Desktop.
Save arianitu/a05a10f73dffc0f37d5c2d4b8cebfc80 to your computer and use it in GitHub Desktop.
Git log
BEFORE MERGE:
➜ myproject git:(testing_branch) ✗ git log --oneline file.java
3b49120 This is the commit I want on master, but is gone.
3a1fb35 message 3
5383931 message 2
2901ac5 message 1
➜ myproject git:(testing_branch) ✗ git log --oneline --graph --decorate --all file.java
* 3b49120 (origin/feature_bcad) This is the commit I want on master, but is gone.
* 3a1fb35 message 3
* 5383931 message 2
* 2901ac5 message 1
➜ myproject git:(testing_branch) ✗ git merge master
After merging master, I noticed a bunch of things like:
CONFLICT (modify/delete): file.php deleted in master and modified in HEAD. Version HEAD of file.php left in tree
IN MERGE:
➜ myproject git:(testing_branch) ✗ git log --oneline file.java
3b49120 This is the commit I want on master, but is gone.
3a1fb35 message
5383931 message
2901ac5 message
➜ myproject git:(testing_branch) ✗ git log --oneline --graph --decorate --all file.java
* 3b49120 (origin/feature_bcad) This is the commit I want on master, but is gone.
* 3a1fb35 message 3
* 5383931 message 2
* 2901ac5 message 1
AFTER MERGING WITH CONFLICTS:
➜ myproject git:(testing_branch) ✗ git commit -a
[testing_branch da20006] Merge branch 'master' into testing_branch
➜ myproject git:(testing_branch) ✗ git log --oneline file.java
5383931 message 2
2901ac5 message 1
➜ myproject git:(testing_branch) ✗ git log --oneline --graph --decorate --all file.java
* 3b49120 (origin/feature_bcad) This is the commit I want on master, but is gone.
* 3a1fb35 message 3
* 5383931 message 2
* 2901ac5 message 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment