Reverting a single file to a previous version in git

Posted by georgeliquor on Stack Overflow See other posts from Stack Overflow or by georgeliquor
Published on 2010-04-28T23:44:58Z Indexed on 2010/04/29 0:47 UTC
Read the original article Hit count: 358

Filed under:
|

Is there a way to go through different commits on a file. Say I modified a file 5 times and I want to go back to change 2, after I already committed and pushed to a repository.

In my understanding the only way is to keep many branches, have I got that right? If I'm right I'm gonna have hundreds of branches in a few days, so I'm probably not understanding it really.

Could anyone clear that up please?

© Stack Overflow or respective owner

Related posts about git

Related posts about revert