On Tue, Dec 6, 2011 at 8:41 AM, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote: > > Is there any way to have git to complain if you are pushing the current > branch with uncommitted changes in your repository? Git has hooks you can use for many ops, but that isn't one of them. The hooks tend to be at the other end (ie around doing things that change *your* repository, rather than change some remote repository). So there are hooks around commit-like operations and around fetching (so you can check that certain rules apply), but not for pushing. That said, depending on *how* you push, you can fake it. For example, since I push to multiple repositories (kernel.org and github, and before I used github I used to have a separate "backup location" at a linux-foundation site), I actually don't use "git push" to update remote repositories, I have a git alias called "push-all" that pushes to multiple remotes in one go. And if you can teach your fingers some new way of pushing, then inside that alias you can obviously add any commands you would want. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html