Re: using git

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----Original Message-----
From: pradeep singh <pradeep.rautela@xxxxxxxxx>
To: SandeepKsinha <sandeepksinha@xxxxxxxxx>
Cc: Kernelnewbies <kernelnewbies@xxxxxxxxxxxx>
Subject: Re: using git

On Mon, May 18, 2009 at 11:20 AM, SandeepKsinha <sandeepksinha@xxxxxxxxx> wrote:
> Hi all,
>
> I have recently started using git... I know quite late.
>
> Say, I make some changes and create a patch.
> I want to revert back the files to the original/initial revision( when
> I created git ), how to do that?
>
> I tried
> git checkout -f
>
> This didn;t work for me.

Perhaps you have commited your changes to the index already.
What you need is
1. git reset --hard
	Dont we have to say the commit name to which HEAD must be changed?
	If a commit was not made this command will change the index & working 
	directory change to last HEAD.
	here since Sandeep has already commited so HEAD will be at the last
	commit, so we have to give git reset --hard $(last clean commit)
thanks & regards
vibi

2. alternatively - git branch $newbranchname
$shasumofcommitwhichwascleanforyou && git checkout $newbranchname &&
git branch -d $oldbranchname

HTH

>
> --
> Regards,
> Sandeep.
>
>
>
>
>
>
> “To learn is to change. Education is a process that changes the learner.”
>
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
> Please read the FAQ at http://kernelnewbies.org/FAQ
>
>






--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux