Skip to main content

Git mein undo karna: restore, reset, revert aur reflog

Kisi bhi stage par change undo karo, unsaved edit se lekar pushed commit tak, reset aur revert mein se chuno, aur reflog se kaam recover karo.

Beginner 3 · Data and toolsabout 1 hour5 sections

Seedha jawab

Uncommitted edits ke liye restore, apne unpushed commits ke liye reset, pushed commits ke liye revert, aur khoya samjha hua kaam dhoondhne ke liye reflog use karo.

Ye kyun zaroori hai

Har koi kabhi na kabhi galat cheez commit karta hai. Har situation ka safe undo jaanne se aap use ek minute mein fix kar paate ho, main todne ya poore din ka kaam khone ki jagah.

Sign up free to read the whole lesson

The rest of this lesson: 5 parts, video lessons, the best course, practice and a quick check. It is free, takes a few seconds and needs no card.

Accounts are for learners aged 18 and over. Under 18? The quick answer and the first part of every lesson stay open: browse lessons by topic.

Software engineeringBeginner 3: Data and toolsVideo lessonsGit resetGit revertCommit

Track

Today's AI turns are used

Lessons, roadmaps, videos, practice cards and the code playground stay free with your account, with no limit.