Are you sure you want to "delete" the changes you have made on you local
branch? If so, you can use "git revert":

git revert commit


But ensure you will do that starting from the top, for instance:

commit ac3ffa718484cbefe4202d4a7263573a696917e4
Author: Alberto Leal <albert...@gmail.com>
Date:   Wed Nov 10 23:25:05 2010 -0200

    Added subdomain

commit a8d66b7ab69aea512afaad1884c801db32045051
Author: Alberto Leal <albert...@gmail.com>
Date:   Thu Nov 4 21:15:35 2010 -0200

    Created structure for the project

commit 70b88554eaadc3f1cee1404db00a42a6d1fbd2bc
Author: Alberto Leal <albert...@gmail.com>
Date:   Thu Nov 4 19:42:04 2010 -0200

    first commit


I just wanna revert the first two commits, then I run:

git revert ac3ffa718484cbefe4202d4a7263573a696917e4
git revert a8d66b7ab69aea512afaad1884c801db32045051

in this order..

But you will need to push it to origin, to keep the history =)

On Thu, Nov 11, 2010 at 12:14 AM, David Doria <daviddo...@gmail.com> wrote:

> So how would I undo all of these commits and get my folder back to
> exactly looking like origin/master? (short of deleting it and
> re-cloning)?
>
> David
>
> On Wed, Nov 10, 2010 at 9:11 PM, Alberto Leal <albert...@gmail.com> wrote:
> > It means that you have some commits in your branch that weren't pushed to
> > origin.
> > To keep your local branch in sync with origin, you need to push your code
> to
> > that frequently.
> > git push origin master
> >
> > On Thu, Nov 11, 2010 at 12:05 AM, David Doria <daviddo...@gmail.com>
> wrote:
> >>
> >> I don't understand what it means by
> >> "Your branch is ahead of origin/master"
> >>
> >> Even if I do a
> >> git reset --hard origin/master
> >> git pull origin master
> >>
> >> git tells me:
> >>
> >> [dor...@localhost ITK]$ git status
> >> # On branch master
> >> # Your branch is ahead of 'origin/master' by 145 commits.
> >> #
> >> nothing to commit (working directory clean)
> >>
> >> How can that be? Shouldn't it be exactly equal to origin/master now?
> >>
> >> Thanks,
> >>
> >> David
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> Groups
> >> "Git for human beings" group.
> >> To post to this group, send email to git-us...@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> git-users+unsubscr...@googlegroups.com<git-users%2bunsubscr...@googlegroups.com>
> .
> >> For more options, visit this group at
> >> http://groups.google.com/group/git-users?hl=en.
> >>
> >
> >
> >
> > --
> > Alberto Leal
> > http://www.albertoleal.eti.br
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Git for human beings" group.
> > To post to this group, send email to git-us...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > git-users+unsubscr...@googlegroups.com<git-users%2bunsubscr...@googlegroups.com>
> .
> > For more options, visit this group at
> > http://groups.google.com/group/git-users?hl=en.
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Git for human beings" group.
> To post to this group, send email to git-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> git-users+unsubscr...@googlegroups.com<git-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/git-users?hl=en.
>
>


-- 
Alberto Leal
@albertoleal
http://www.albertoleal.me - English Blog
http://www.albertoleal.eti.br - Portuguese Blog

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.

Reply via email to