Mongoose - Using CRUD operations in mongodb in nodejs
MongoDB CRUD Operations Mongoose provides a simple schema based solution to…
July 07, 2020
In this post, we will see ways to look at git history logs.
For other git training posts, visit:
There are log of options with this command. Try this
git help log
Run simple git log
command.
Example Output:
commit e7dd2a062d569a9fc577180acde0a2b7a0a570f6 (HEAD -> master, origin/master, origin/HEAD)
Author: Gorav Singal <[email protected]>
Date: Wed Jul 8 11:49:10 2020 +0530
t2
commit 007675fed3657a0b194386c8c0efbeac2e1fbbed
Author: Gorav Singal <[email protected]>
Date: Wed Jul 8 11:49:01 2020 +0530
t1
commit 1a2af9c018e83aa0adef0684875ab7c33499b7d0
Author: Gorav Singal <[email protected]>
Date: Wed Jul 8 11:45:46 2020 +0530
test
I’ve ommitted few lines in above output. This output shows commits in reverse order. The most recent commit is on top. It shows a commit id, author, and date.
There is another command to get this history, with shorter commit ids.
git log --abbrev-commit
This shows shorter length of commit it. Typically this is only required to uniquely identify your commit.
Lets see another shorter version of output:
git log --oneline --graph --decorate
# oneline - is for compact output
# graph - some sort of graphical representation of commit history
# decorate - shows any tags, labels etc
# Output
* e7dd2a0 (HEAD -> master, origin/master, origin/HEAD) t2
* 007675f t1
* 1a2af9c test
* f997108 test
* 9a5a776 test
* 85587c6 test1
* 574c251 test 1
git log 1a2af9c...85587c6
You will get commit history with in this commit id range only.
git log --since="5 days ago"
git log -- <file>
$ git show 574c251142008b98c74d2bed708d05953acd3f0e
commit 574c251142008b98c74d2bed708d05953acd3f0e
Author: Gorav Singal <[email protected]>
Date: Tue Jul 7 14:14:56 2020 +0530
test 1
diff --git a/test1.txt b/test1.txt
new file mode 100644
index 0000000..45b983b
--- /dev/null
+++ b/test1.txt
@@ -0,0 +1 @@
+hi
It has commit-id, author info, date, and the actual diff too.
MongoDB CRUD Operations Mongoose provides a simple schema based solution to…
Introduction There might be a situation when you are doing some changes in the…
Introduction I have a host running mysql (not on a container). I have to run an…
While running docker commands with some images, I started getting error: The…
Thanks for reading.
This will take backup of your passed database name, to the passed folder. It…
In this post, we will see some of the frequently used concepts/vocabulary in…
System design interview is pretty common these days, specially if you are having…
Introduction You are given an array of integers with size N, and a number K…
Graph Topological Sorting This is a well known problem in graph world…
Problem Statement Given a Binary tree, print out nodes in level order traversal…
Problem Statement Given an array nums of n integers and an integer target, are…