On Mon, 15 Dec 2014 08:46:46 +0200 Kevin Wilson <wkev...@gmail.com> wrote:
> Is there a command to roll back to the first commit in a repository? I think you need to think about what you want to achieve a bit harder: to roll back what exactly? All the commits in any Git repository form one or more (directed, acyclic) graphs, and a commit is said to exist in a repository only if it is referenced, directly or indirectly, by one of entry points to those graphs. Entry points are branches and tags, so to have a repository with the single existing commit you have to make sure all the branches and tags existing in that repository point to that single commit. If, instead, you wanted to reset just a single branch to contain just that commit, you just do use `git reset` to make that branch point to that commit. Consider reading [1] to learn about how the `git reset` command works. 1. http://git-scm.com/book/en/v2/Git-Tools-Reset-Demystified -- 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 git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.