Re: git push requires a subsequent git reset --hard ?

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

 



On Tue, Jul 01, 2008 at 10:29:38AM -0700, Jakub Narebski wrote:
> 
> This is considered normal.  Push would never touch index nor working
> area (although if you are the only user, and you know what you are
> doing, you can add "git reset --hard HEAD" to post-receive hook).

Doing "reset --hard" makes all your uncommit changes to be lost.
OTOH, if you push on the local branch assotiated with HEAD then
recovering all uncommit changes later will not be easy either. So,
I wonder, if git push should require --force if you want to push
to the HEAD branch of a non-bare repo. It will be at least some
warning (especially for novices) to not to do that, and those who
really want to understand what they are doing can use --force.

Dmitry
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux