forked from pandian3k/murthydevops
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGIT.txt
More file actions
123 lines (96 loc) · 2.61 KB
/
GIT.txt
File metadata and controls
123 lines (96 loc) · 2.61 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
Useful
Git COMMANDS:
-------------------------------------------------------
git config --global user.name "username"
git config --global user.email "email@example.com"
git config --list
git clone
git --help
git --version
git add filename
git add .
git commit -m "any message"
git commit -a -m "anymessage"
git commit --amend -m "message related commit"
git push
git pull
git log
git status
git init
git remote -v
git remote add anyname url_of_empty_repository
git push origin master
git branch branchname
git checkout branchname
git merge branchname1 branchname2 (master stl)master
git rebase branchname1 branchname2
git branch -m old_branch_name new_branch_name // branch rename
git branch -d branchname1 //delete the merged branch
git branch -d -r origin/branch_name origin/branch_name origin // to delete the remote branch
git push origin --delete branchname // delete the mranch from remote
git diff
git revert
git revert --continue
git reset
git reset --hard // can not able to reset bask
git resetgit push origin master --force
git log --graph --oneline --decorate
git branch -a
git checkout -b branchname origin/branchname
git rm --cached "file name"
git rm "filename"
------------------------------------------------------------------------------------------------------------------------
ANT COMMANDS
ant clean
ant
ant compile
------------------------------------------------------------------------------------------------------------------------
MAVEN COMMANDS
mvn clean
mvn compile
mvn verify
mvn install
mvn clean install
mvn test
------------------------------------------------------------------------------------------------------------------------
GRADLE COMMANDS
gradle clean
gradle assemble
gradle build
------------------------------------------------------------------------------------------------------------------------
Docker Commands
docker info
docker pull
docker images
docker run
docker ps
docker ps -a
docker stop
docker rm
docker run <image>
docker run --name=<customname> <image>
docker run --rm <image>
docker run --d <image>
docker run --d -it <image>
docker run --d -p 4000:4000
Examples:
docker pull alpine
docker run alpine sh
docker ps -a
docker run -d -it alpine sh
docker run -it alpine sh
ps
docker run -it --name=MyLinux alpine sh
docker ps -a
docker stop MyLinux
docker rm MyLinux
docker pull microsoft/nanoserver
docker run -it microsoft/nanoserver cmd
docker run -it microsoft/nanoserver cmd /c echo "some message"
docker network ls
docker inspect nat
docker inspect
docker pull microsoft/iis:nanoserver
docker run -d microsoft/iis
docker run -d -p 8000:8000 microsoft/iis:nanoserver
docker ps -a