Skip to content

Commit f8df8d5

Browse files
3rd Update README.md
1 parent 85bace5 commit f8df8d5

File tree

1 file changed

+69
-32
lines changed

1 file changed

+69
-32
lines changed

README.md

Lines changed: 69 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@ Download and install from [Visual Studio Code](https://code.visualstudio.com/).
8080
Open VS Code.
8181
Go to the Extensions view by clicking the Extensions icon in the Activity Bar on the side of the window.
8282
Search for "GitLens" and install it for enhanced Git capabilities.
83+
84+
- #### change default code editor
85+
You can change the default code editor in your system to vscode. To do this, you can use the following command:
86+
```cmd
87+
git config --global core.editor "code --wait"
88+
```
8389
# Initialize folder into Git Repository.
8490
- Create a folder and open in vs code.
8591
- Open the terminal in VS Code.
@@ -98,11 +104,13 @@ Search for "GitLens" and install it for enhanced Git capabilities.
98104

99105
commit is a way to save your changes to your repository. It is a way to record your changes and make them permanent. You can think of a commit as a snapshot of your code at a particular point in time. When you commit your changes, you are telling git to save them in a permanent way. This way, you can always go back to that point in time and see what you changed.
100106

107+
## Steps of commit
108+
101109
![logo](https://app.eraser.io/workspace/SMlHs99FVb8wFX7uXTLP/preview?elements=PBx4CuCnDKSV09sU8nNxVw&type=embed)
102110

103-
- write code, then
111+
1. write code
104112

105-
- . Add you file
113+
2. . Add your file
106114
```cmd
107115
git add <FILE_NAME> <FILE_NAME> <FILE_NAME>
108116
```
@@ -111,50 +119,79 @@ commit is a way to save your changes to your repository. It is a way to record y
111119
```cmd
112120
git add .
113121
```
114-
## Support
115-
116-
For support, email [email protected] or join our Slack channel.
117-
122+
3. commit
123+
```cmd
124+
git commit -m "commit message"
125+
```
126+
- Here we are committing the changes to the repository. We can see that the changes are now committed to the repository. The `-m` flag is used to add a message to the commit. This message is a short description of the changes that were made. You can use this message to remember what the changes were.
118127

119-
## Environment Variables
128+
4. check status (optional)
120129

121-
To run this project, you will need to add the following environment variables to your .env file
130+
```cmd
131+
git status
132+
```
133+
## Logs
134+
The git log command is a powerful tool in Git that allows you to view the history of your repository. When used with the --oneline option, it presents this history in a simplified, condensed format. Here's a quick guide to help you understand and use these commands effectively.
135+
136+
#### What is git log?
137+
git log displays the commit history of your repository. By default, it shows detailed information about each commit, including:
138+
139+
- Commit hash
140+
- Author
141+
- Date
142+
- Commit message
143+
#### Key Points About git log
144+
- **Comprehensive History** : See all commits, from the most recent to the earliest.
145+
- **Details** : Includes author, date, and the commit message for each commit.
146+
- **Customizable** : Can be tailored with various options to show different levels of detail or specific information.
147+
148+
Example Usage :
149+
```cmd
150+
git log
151+
```
152+
#### Simplifying with `--oneline`
122153

123-
`API_KEY`
154+
Adding the `--oneline` option to git log condenses the output, showing each commit in a single line. This format includes:
124155

125-
`ANOTHER_API_KEY`
156+
- **Abbreviated Commit Hash** : Shorter version of the full commit hash.
157+
- **Commit Message** : The first line of the commit message.
126158

159+
#### Key Points About `--oneline`
160+
**Compact View** : Easier to scan through the commit history quickly.
161+
** Abbreviated Hashes** : Shortened commit hashes for simplicity.
162+
** Ideal for Summarizing** : Useful when you need a quick overview.
127163

128-
## Features
164+
Example Usage :
165+
```cmd
166+
git log --oneline
167+
```
168+
# .gitignore
129169

130-
- Light/dark mode toggle
131-
- Live previews
132-
- Fullscreen mode
133-
- Cross platform
170+
The `.gitignore` file is a crucial component for managing Git repositories. It helps developers control which files and directories should be ignored by Git, preventing them from being tracked and versioned. This is particularly useful for keeping your repository clean and focused on the necessary files.
134171

172+
#### Key Points
173+
- **Purpose** : `.gitignore` tells Git which files or directories to ignore, ensuring they are not committed to the repository.
174+
- **Common Uses** : Ignoring build files, temporary files, configuration files, and dependencies that are not needed in the version control system.
135175

136-
![Logo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/th5xamgrr6se0x5ro4g6.png)
176+
### How to Create and Use a .gitignore File
137177

178+
#### Step-by-Step Guide
179+
1. Create the .gitignore File
180+
- In your project root directory, create a new file named `.gitignore`.
138181

139-
## Demo
182+
2. Add Patterns to .gitignore
140183

141-
Insert gif or link to demo
184+
- Each line in the `.gitignore` file represents a pattern for files/directories to ignore.
142185

186+
Example :
187+
```
188+
# Ignore node_modules directory
189+
node_modules/
143190
144-
## Usage/Examples
191+
# Ignore all .log files
192+
*.log
145193
146-
```javascript
147-
import Component from 'my-project'
194+
# Ignore specific file
195+
secret.txt
148196
149-
function App() {
150-
return <Component />
151-
}
152197
```
153-
154-
155-
## Related
156-
157-
Here are some related projects
158-
159-
[Awesome README](https://github.com/matiassingers/awesome-readme)
160-

0 commit comments

Comments
 (0)