Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6620fa0

Browse files
author
Saiful
committed
readme update
1 parent b17239f commit 6620fa0

File tree

1 file changed

+41
-40
lines changed

1 file changed

+41
-40
lines changed

‎README.md

Lines changed: 41 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ followed the easiest process.
88
> 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/).
99
1010
## Workflow
11-
11+
1212
<div style="text-align: center;">
1313
<img src="https://github.com/saifaustcse/Git-workflow-and-commands/blob/main/images/workflow.png" width="750" height="450">
1414
<div>
1515

1616
## Commands
1717

1818
### Configuration
19-
20-
Git config that lets you get and set configuration variables that control all aspects of how Git looks and operates.
19+
20+
Git config that lets you get and set configuration variables that control all aspects of how Git looks and operates.
2121

2222
# Display the current Git configuration.
2323
$ git config --list
@@ -30,16 +30,18 @@ followed the easiest process.
3030
git config --global user.name
3131
git config --global user.email
3232

33-
3433
### Manage Repository
3534

36-
Create a Repository in git hub/git lab then Clone the Repository
37-
* [How to create git hub repository.](https://docs.github.com/en/free-pro-team@latest/github/getting-started-with-github/create-a-repo)
35+
Create a Repository in git hub/git lab then Clone the Repository
36+
37+
- [How to create git hub repository.](https://docs.github.com/en/free-pro-team@latest/github/getting-started-with-github/create-a-repo)
38+
3839

3940
# Download an existing git repository to your local computer with its entire code history.
4041
$ git clone [url]
4142

42-
43+
44+
4345
### Adding files and folder (Workspace --> Staging)
4446

4547
# Add the specified file from the current directory to the staging.
@@ -98,7 +100,8 @@ followed the easiest process.
98100

99101
# merge a branch into a target branch
100102
$ git merge [source branch] [target branch]
101-
103+
104+
102105
### Workspace synchronization from remote (Workspace <-- Repository <-- Remote)
103106

104107
# Retrieve the changes to the Remote Repository and merge with the local branch (fetch+merge)
@@ -133,7 +136,8 @@ followed the easiest process.
133136
# Delete the remote branch.
134137
$ git push origin --delete [branch-name]
135138
$ git branch -dr [remote/branch]
136-
139+
140+
137141
### Inspection
138142

139143
# Display the changed files.
@@ -163,12 +167,11 @@ followed the easiest process.
163167
# Show the latest commits of the current branch.
164168
$ git reflog
165169

166-
For more details:
167-
168-
* [The-official-Git-site](https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History)
169-
* [Atlassian](https://www.atlassian.com/git/tutorials/git-log)
170-
* [Thegeekstuff](https://www.thegeekstuff.com/2014/04/git-log/)
170+
For more details:
171171

172+
- [The-official-Git-site](https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History)
173+
- [Atlassian](https://www.atlassian.com/git/tutorials/git-log)
174+
- [Thegeekstuff](https://www.thegeekstuff.com/2014/04/git-log/)
172175

173176
### Discard changes from Workspace
174177

@@ -182,11 +185,11 @@ followed the easiest process.
182185

183186
# If unwanted file were added to the staging area but not yet committed.
184187
# Restore specified file from the Staging to the Workspace.
185-
# Changes will stay in workspace.
188+
# Changes will stay in workspace.
186189
$ git reset [file]
187190

188191
# Restore all files from the Staging to the Workspace.
189-
# Changes will stay in workspace.
192+
# Changes will stay in workspace.
190193
$ git reset
191194
$ git reset HEAD .
192195

@@ -212,7 +215,6 @@ followed the easiest process.
212215
# Undo the last commit.
213216
$ git reset --hard HEAD~1
214217

215-
216218
### Revoke/Undo from Remote (Workspace <-- Staging <-- Repository <-- Remote)
217219

218220
# Create a new commit to undo the specified commit.
@@ -221,41 +223,42 @@ followed the easiest process.
221223
$ git revert [commit]
222224
$ git commit -m "message"
223225
$ git push origin [branch]
224-
226+
225227
### Removing files or folders (Workspace --> Staging --> Repository --> Remote)
226-
228+
227229
# Manually delete the files or folders from Workspace
228-
# The following command will permanently remove the files or folders
230+
# The following command will permanently remove the files or folders
229231
$ git add .
230232
$ git commit -m "message"
231233
$ git push origin [branch]
232-
234+
235+
233236
### Stash
234237

235238
# Temporarily saves or stashes changes of working copy and and move them in later.
236239
$ git stash
237240

238241
# Saving Stashes with the message
239-
$ git stash save "<Stashing Message>"
242+
$ git stash save "<Stashing Message>"
240243

241244
# Check the Stored Stashes
242-
$ git stash list
243-
245+
$ git stash list
246+
244247
# Restored the changes of latest stash from stashes
245248
# Remove the latest stash from stashes
246249
$ git stash pop
247250

248251
# Restored the changes of latest stash from stashes
249-
$ git stash apply
250-
252+
$ git stash apply
253+
251254
# Restored the changes of specific stash from stashes
252255
$ git stash apply <stash id>
253256

254257
# Remove the latest stash from stashes
255258
$ git stash drop
256259

257260
# Remove the specific stash from stashes
258-
$ git stash drop <stash id>
261+
$ git stash drop <stash id>
259262

260263
# Remove all stashes
261264
$ git stash clear
@@ -294,29 +297,27 @@ followed the easiest process.
294297
# Tag is nothing but a reference name of a commit
295298
# Multiple tag name is possible for same commit
296299

297-
### cherry-pick
300+
### cherry-pick
298301

299302
# Select a commit to be merged into the current branch.
300303
$ git cherry-pick [commit]
301304

302305
### Checkout vs Reset vs Revert
303306

304-
* [Atlassian](https://www.atlassian.com/git/tutorials/resetting-checking-out-and-reverting)
305-
* [Medium](https://medium.com/@manivel45/git-merge-vs-rebase-reset-vs-revert-vs-checkout-dd5674d0e18a)
306-
* [opensource](https://opensource.com/article/18/6/git-reset-revert-rebase-commands)
307+
- [Atlassian](https://www.atlassian.com/git/tutorials/resetting-checking-out-and-reverting)
308+
- [Medium](https://medium.com/@manivel45/git-merge-vs-rebase-reset-vs-revert-vs-checkout-dd5674d0e18a)
309+
- [opensource](https://opensource.com/article/18/6/git-reset-revert-rebase-commands)
307310

308311
### Merging vs. Rebasing
309312

310-
* [Atlassian](https://www.atlassian.com/git/tutorials/merging-vs-rebasing)
311-
313+
- [Atlassian](https://www.atlassian.com/git/tutorials/merging-vs-rebasing)
312314

313315
# References
314316

315-
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.
316-
317-
* [The-official-Git-site](https://git-scm.com/book/en/v2)
318-
* [Atlassian](https://confluence.atlassian.com/bitbucketserver/basic-git-commands-776639767.html)
319-
* [Git-most-frequently-used-commands](https://medium.com/analytics-vidhya/git-most-frequently-used-commands-9df9f200c235)
320-
* [Ercankaracelik](https://ercankaracelik.wordpress.com/2018/12/08/basic-git-commands/)
321-
* [Tutorialdocs](https://www.tutorialdocs.com/article/git-basic-command-list.html)
317+
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.
322318

319+
- [The-official-Git-site](https://git-scm.com/book/en/v2)
320+
- [Atlassian](https://confluence.atlassian.com/bitbucketserver/basic-git-commands-776639767.html)
321+
- [Git-most-frequently-used-commands](https://medium.com/analytics-vidhya/git-most-frequently-used-commands-9df9f200c235)
322+
- [Ercankaracelik](https://ercankaracelik.wordpress.com/2018/12/08/basic-git-commands/)
323+
- [Tutorialdocs](https://www.tutorialdocs.com/article/git-basic-command-list.html)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /