-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgit_commands
More file actions
111 lines (59 loc) · 1.68 KB
/
git_commands
File metadata and controls
111 lines (59 loc) · 1.68 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
1) git remote add githubRepo https://github.com/anji/ab.git
2) git remote
3) git push -u remote master
4)
buckyroberts
https://github.com/anjijava16/DockerSetup.git
git clone https://github.com/anjijava16/DockerSetup.git
git add fileName
git commit -m 'first version of code'
git log
git push
git difftool HEAD
hun=input("are u hundry")
if hun=="yes":
print ("")
else:
print (" ")
git checkout -- abc.txt (Update in git code)
Checkout specific file
git checkout -- .
(Checkout new code all files)
git add addFileName
git commit -m 'aadd'
====================================
git revert commidID
git rever ID
EX: git revert 43cd08c991833115a35045c42f4b40b171c85408
git revert -n 43cd08c991833115a35045c42f4b40b171c85408
git reset -hard commid_id
Branches Codes ::==>>
git branch
by default it is master.
// Creating a branch
git branch dev1
// changing the branch
git checkout dev1
2081 git push
2082 git checkout dev1
2083 git checkout master
2084 git merge dev1
2085 git merge master
2086 git push dev1
2087 git push
2088 git checkout dev1
2089 git push
2090 git push --set-upstream origin dev1
Creating branch: git checkout -b dummy
// Deleting the branch
git branch -d dummy
git branch // list of the branches
git branch xyz // create a new branch with name xyz
git checkout xyz // make xyz an actie branch
git checkout -b mybran : create new branch and active it
git merge xyz ---Merge xyz into current branch
git branch -d xyz --delete xyz branch
================================
git push -u origin master
get remote add origin https://github.com/anjijava16/Aws_Dev_Utils.git
git push -u origin master