You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-19Lines changed: 20 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,14 +6,15 @@ Though there are 1000’s of articles about git, I have written this article is
6
6
7
7
> If you think that these can be improved in anyway, please do suggest. Pull Request are highly appreciated. Find me if you wish [@Saif(https://www.linkedin.com/in/saif-aust-cse/).
8.### Remote synchronization from Repository(Repository --> Remote)
91
+
### Remote synchronization from Repository(Repository --> Remote)
91
92
92
93
# Push the current branch to the Remote Repository.
93
94
$ git push origin [branch]
94
95
95
96
96
-
9.### Repository synchronization from remote (Repository <-- Remote)
97
+
### Repository synchronization from remote (Repository <-- Remote)
97
98
98
99
# Download specific branch.
99
100
$ git fetch origin [branch]
@@ -102,20 +103,20 @@ Though there are 1000’s of articles about git, I have written this article is
102
103
$ git fetch --all
103
104
104
105
105
-
10.### Workspace synchronization from Repository (Workspace <-- Repository)
106
+
### Workspace synchronization from Repository (Workspace <-- Repository)
106
107
107
108
# merge the specified branch to the current branch.
108
109
$ git merge [branch]
109
110
110
111
# merge a branch into a target branch
111
112
$ git merge [source branch] [target branch]
112
113
113
-
11.### Workspace synchronization from remote (Workspace <-- Repository <-- Remote)
114
+
### Workspace synchronization from remote (Workspace <-- Repository <-- Remote)
114
115
115
116
# Retrieve the changes to the Remote Repository and merge with the local branch (fetch+merge)
116
117
$ git pull origin [branch]
117
118
118
-
12.### Branching
119
+
### Branching
119
120
120
121
# List all local branches. (the asterisk denotes the current branch)
121
122
$ git branch
@@ -145,7 +146,7 @@ Though there are 1000’s of articles about git, I have written this article is
145
146
$ git push origin --delete [branch-name]
146
147
$ git branch -dr [remote/branch]
147
148
148
-
13.### Inspection
149
+
### Inspection
149
150
150
151
# Display the changed files.
151
152
$ git status
@@ -162,15 +163,15 @@ Though there are 1000’s of articles about git, I have written this article is
162
163
# Show the latest commits of the current branch.
163
164
$ git reflog
164
165
165
-
14.### Ignore files and folder
166
+
### Ignore files and folder
166
167
167
168
# Delete the files in the Workspace and put this deletion into the Staging.
168
169
$ git rm [file1] [file2] ...
169
170
170
171
# Stop tracking the specified file, but the file will be remained in the Workspace.
171
172
$ git rm --cached [file]
172
173
173
-
15.### Tag
174
+
### Tag
174
175
175
176
# List all tags.
176
177
$ git tag
@@ -200,7 +201,7 @@ Though there are 1000’s of articles about git, I have written this article is
200
201
$ git checkout -b [branch] [tag]
201
202
202
203
203
-
16.### Revoke
204
+
### Revoke
204
205
205
206
# Restore the specified file of the Staging to the Workspace.
206
207
$ git checkout [file]
@@ -235,15 +236,15 @@ Though there are 1000’s of articles about git, I have written this article is
235
236
$ git stash pop
236
237
237
238
238
-
17.### Others
239
+
### Others
239
240
240
241
# Select a commit to be merged into the current branch.
241
242
$ git cherry-pick [commit]
242
243
243
244
# Generate a archive for releasing.
244
245
$ git archive
245
246
246
-
18.### References
247
+
# References
247
248
248
249
I have followed many articles but among them, the following articles are really helpful. Those articles helped me a lot and also encourage me to write this article according to my understanding.
0 commit comments