TECHNICALSTUDY

The associate of technical study article for computer science students which could gain the knowledge about to technicals like Computer history, hard disk, printer,central processing unit etc. Technicalstudy also considered software engineering, operating system and some chunks of programming languages.

Email subscription

Enter your email address:

Delivered by FeedBurner

Thursday, November 2, 2023

How to Revert unnecessary Commit from Remote Branch

 If you have push unnecessary code accidentally so how to Revert code changes of last Commit.


1- Switch to your project Directory


2- .../$: git log 

By this command commits log list show and copy to last unnecessary Commit id


3- .../$: git revert past_CommitId_here


-> After that simple use bellow command


4- .../$: git push 


And check you repository for fixed changes


5- how to be exit after git log command:

 .../$:q+Enter <---

No comments:

Post a Comment

Adbox