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 bc1f7cf

Browse files
author
Saiful
committed
readme update
1 parent 5601b8c commit bc1f7cf

File tree

1 file changed

+20
-19
lines changed

1 file changed

+20
-19
lines changed

‎README.md‎

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@ Though there are 1000’s of articles about git, I have written this article is
66

77
> 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/).
88
9-
1.### Workflow
9+
## Workflow
1010

1111
<div style="text-align: center;">
12-
<img src="https://github.com/saifaustcse/Basic-git-commands/blob/main/images/workflow.png" width="750" height="450">
12+
<img src="https://github.com/saifaustcse/Git-workflow-and-commands/blob/main/images/workflow.png" width="750" height="450">
1313
<div>
1414

1515

16-
2. ### Configuration
16+
## Commands
17+
### Configuration
1718

1819
git config that lets you get and set configuration variables that control all aspects of how Git looks and operates.
1920

@@ -28,7 +29,7 @@ Though there are 1000’s of articles about git, I have written this article is
2829
git config --global user.name
2930
git config --global user.email
3031

31-
3.### Manage Repository
32+
### Manage Repository
3233

3334
Pocess 1: Create a Repository in git hub/git lab then Clone the Repository
3435

@@ -46,7 +47,7 @@ Though there are 1000’s of articles about git, I have written this article is
4647
5- $ git remote add origin github.com/saifaustcse/new_repository
4748
6- $ git push -u origin master
4849

49-
4.### Adding files and folder (Workspace --> Staging)
50+
### Adding files and folder (Workspace --> Staging)
5051

5152
# Add the specified file from the current directory to the staging.
5253
$ git add [file1] [file2] [fileN]
@@ -62,7 +63,7 @@ Though there are 1000’s of articles about git, I have written this article is
6263
$ git reset HEAD [file_name]
6364

6465

65-
5.### Commit changes (Staging --> Repository)
66+
### Commit changes (Staging --> Repository)
6667

6768
# Submit the code from the staging to the Repository with a message
6869
$ git commit -m [message]
@@ -73,7 +74,7 @@ Though there are 1000’s of articles about git, I have written this article is
7374
# Display all diff information when submitting.
7475
$ git commit -v
7576

76-
6.### Commit changes (Workspace --> Staging --> Repository)
77+
### Commit changes (Workspace --> Staging --> Repository)
7778

7879
# Submit the changes of all tracked files after the last commit.
7980
$ git commit -am [message]
@@ -82,18 +83,18 @@ Though there are 1000’s of articles about git, I have written this article is
8283
$ git add .
8384
$ git commit -am [message]
8485

85-
7.### Undo Commit (Workspace <-- Staging <-- Repository )
86+
### Undo Commit (Workspace <-- Staging <-- Repository )
8687

8788
# Undo the last commit.
8889
$ git reset HEAD~1
8990

90-
8.### Remote synchronization from Repository(Repository --> Remote)
91+
### Remote synchronization from Repository(Repository --> Remote)
9192

9293
# Push the current branch to the Remote Repository.
9394
$ git push origin [branch]
9495

9596

96-
9.### Repository synchronization from remote (Repository <-- Remote)
97+
### Repository synchronization from remote (Repository <-- Remote)
9798

9899
# Download specific branch.
99100
$ git fetch origin [branch]
@@ -102,20 +103,20 @@ Though there are 1000’s of articles about git, I have written this article is
102103
$ git fetch --all
103104

104105

105-
10.### Workspace synchronization from Repository (Workspace <-- Repository)
106+
### Workspace synchronization from Repository (Workspace <-- Repository)
106107

107108
# merge the specified branch to the current branch.
108109
$ git merge [branch]
109110

110111
# merge a branch into a target branch
111112
$ git merge [source branch] [target branch]
112113

113-
11.### Workspace synchronization from remote (Workspace <-- Repository <-- Remote)
114+
### Workspace synchronization from remote (Workspace <-- Repository <-- Remote)
114115

115116
# Retrieve the changes to the Remote Repository and merge with the local branch (fetch+merge)
116117
$ git pull origin [branch]
117118

118-
12.### Branching
119+
### Branching
119120

120121
# List all local branches. (the asterisk denotes the current branch)
121122
$ git branch
@@ -145,7 +146,7 @@ Though there are 1000’s of articles about git, I have written this article is
145146
$ git push origin --delete [branch-name]
146147
$ git branch -dr [remote/branch]
147148

148-
13.### Inspection
149+
### Inspection
149150

150151
# Display the changed files.
151152
$ git status
@@ -162,15 +163,15 @@ Though there are 1000’s of articles about git, I have written this article is
162163
# Show the latest commits of the current branch.
163164
$ git reflog
164165

165-
14.### Ignore files and folder
166+
### Ignore files and folder
166167

167168
# Delete the files in the Workspace and put this deletion into the Staging.
168169
$ git rm [file1] [file2] ...
169170

170171
# Stop tracking the specified file, but the file will be remained in the Workspace.
171172
$ git rm --cached [file]
172173

173-
15.### Tag
174+
### Tag
174175

175176
# List all tags.
176177
$ git tag
@@ -200,7 +201,7 @@ Though there are 1000’s of articles about git, I have written this article is
200201
$ git checkout -b [branch] [tag]
201202

202203

203-
16.### Revoke
204+
### Revoke
204205

205206
# Restore the specified file of the Staging to the Workspace.
206207
$ git checkout [file]
@@ -235,15 +236,15 @@ Though there are 1000’s of articles about git, I have written this article is
235236
$ git stash pop
236237

237238

238-
17.### Others
239+
### Others
239240

240241
# Select a commit to be merged into the current branch.
241242
$ git cherry-pick [commit]
242243

243244
# Generate a archive for releasing.
244245
$ git archive
245246

246-
18.### References
247+
# References
247248

248249
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.
249250

0 commit comments

Comments
(0)

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