Skip to content

Commit 0ec2327

Browse files
🔄 day 22 - revert changes
1 parent ac7e463 commit 0ec2327

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

Day 22/README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Day 22
2+
3+
Today we will learn to revert changes in a workflow.
4+
5+
## Problem Statement:
6+
We were talking about how to undo a commit, and fix it.
7+
This only helps when you haven't already pushed it to a remote.
8+
When that has happened, and you want to undo the effects of the
9+
commit completely, your best option is `git revert`.
10+
11+
### Questions:
12+
- The team's main branch no longer contains the bad thing.
13+
- And the history has not been modified.
14+
15+
### Files:
16+
- text
17+
18+
<div align="center">
19+
<img src="https://github.com/ArnabKumarRoy02/Learn-git/assets/86621483/42f1f785-73f3-4913-9e3e-3fd0b9f8bd0c" width=450>
20+
<p>Description of the problem.</p>
21+
</div>
22+
23+
24+
## Solution:
25+
26+
1. Create a new commit with the current broken issue.
27+
```bash
28+
git revert "SHA Code"
29+
```
30+
31+
2. Fix the issue.
32+
```bash
33+
nvim text
34+
git add .
35+
```
36+
37+
3. Push the file.
38+
```bash
39+
git commit -m "issue fixed"
40+
git push
41+
```
42+
43+
44+
<div align="center">
45+
<img src="https://github.com/ArnabKumarRoy02/Learn-git/assets/86621483/ca0b4b43-0aa4-4bda-8ef3-06fbe5a9c9c1" width=450>
46+
<p>Description of the solution.</p>
47+
</div>

0 commit comments

Comments
 (0)