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

[gits] n00b question about reverting changes

	Suresh> git revert ?some previous commit?..HEAD ? 


FWIW, an easy way to experiment with git is simply to copy your repository
directory.  Just do a recursive copy...

	cp -pr my-repo my-test-repo

And then do things to "my-test-repo".  If you somehow damage "my-test-repo",
you don't have to worry about figuring out how to undo your changes within git.
Just throw it away.

If you like your changes, of course, you can push your changes upstream from
"my-test-repo", and then pull them into your real repo.  Or you can repeat your
commands in your real repo, or whatever.

Several Fluxers use this technique because they are sure about how "cp -r"
works, and not so sure about how git works :-).


Eric Eide <eeide at cs.utah.edu>  .         University of Utah School of Computing
http://www.cs.utah.edu/~eeide/ . +1 (801) 585-5512 voice, +1 (801) 581-5843 FAX