How can I retrieve previous version data in Git & GitHub!!?

0 votes
Hi,

I accidentally commit in a wrong version. How can I go to the previous version?

Can anyone tell me the concept?

Thank You
Feb 3 in Git & GitHub by akhtar
• 24,850 points
213 views
I think git revert can help in this. Please look for it.

Thanks. I will try this. But we can also use git reset

For example,

$ git reset "version id" filename.

$ git checkout filename.

1 answer to this question.

0 votes

Hi@akhtar,

You can use reset command to do this task.

$ git reset "version id" filename.
$ git checkout filename.

I hope this will help.

answered Jul 18 by MD
• 56,020 points

Related Questions In Git & GitHub

0 votes
0 answers

How to use p4merge tool in Git & GitHub?

Hi, Can someone tell me, how to use ...READ MORE

Jan 31 in Git & GitHub by akhtar
• 24,850 points
73 views
0 votes
1 answer

How to roll back to previous version in Git?

Hi@akhtar, You can roll back your previous version ...READ MORE

answered Apr 29 in Git & GitHub by MD
• 56,020 points
63 views
0 votes
1 answer

How to create branch in GitHub from my local Git repo?

Hi@akhtar, To sync your existing branch in GitHub, ...READ MORE

answered May 7 in Git & GitHub by MD
• 56,020 points
75 views
–1 vote
1 answer

Having problem in Github and remote Git repo with production and development code

I think you could start with this. The ...READ MORE

answered Apr 10, 2018 in Git & GitHub by shubham
• 6,910 points
195 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
675 views
+2 votes
1 answer
0 votes
1 answer

How merge works in Git & GitHub!!!??

Hi@Hasid, In Git & GitHub merge concept comes ...READ MORE

answered Jan 31 in Git & GitHub by MD
• 56,020 points
61 views
0 votes
1 answer

How can I set ssh key in GitHub?

Hi@akhtar, First you have to generate key using ...READ MORE

answered Feb 4 in Git & GitHub by MD
• 56,020 points
126 views