Hello, you will need to reset the branch: git reset SHA
Best, Gergely On 28 Sep 2015 05:27, "Raghu K" <[email protected]> wrote: > Using some online code I have created a python tool that outputs fancy > status for any given directory if > a pull is needed, push is needed or commit is needed. > > I am writing unit tests for each of these statuses. In order to write the > unit test (without new pushed changes) for a pull status I would like to > checkout > a repo and set it to a earlier state so that when I run the tool it would > show "a pull is needed" status. > > How to revert a repository to a older commit so that : git log HEAD.. > origin/master --oneline > > will show that there are incoming changes ? > > I tried doing git checkout SHA but that puts it into Detached state. > Please, suggest. > > -- > You received this message because you are subscribed to the Google Groups > "Git for human beings" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
