-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgit-command.txt
More file actions
59 lines (47 loc) · 1.07 KB
/
git-command.txt
File metadata and controls
59 lines (47 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
For status"
$ git status
-----
check log with differentiate
$ git log -p
for specific number
$ git log -p -n
where n is a simple any number 1 -10-100-----
e.g
$ git log -p -2
--------
for small summary"
git log --stat
------------
check log list in one line
$ git log --pretty=oneline
----------
check log in short form
$ git log --pretty=short
-----
check log with some extra
$ git log --pretty=full
----
check last specific days/week/months/years log
$ git log --since=2.days
or
$ git log --since=2.months
---
if you want a log in specific format, follow this link
https://git-scm.com/docs/git-log
e.g
$ git log --pretty=format:"%h -- %an" (%h = hash key, %an = auther name)
or
$ git log --pretty=format:"%h -- %en" (%h = hash key, %an = auther email)
------
un-stage the any file
$ git restore --staged <filename>
----
file return its origional status ( reture back after any wrong addition/deletion)
$ git checkout -- <filename>
----
if you full folder return back stage
$ git checkout -f
--------
Alias
for short command for status
$ git config --global alias.st status