git reset respect remote repo (make git idiot proof)

2012-10-03 Thread Geoffrey De Smet
Suppose this case: git clone .../blessedRepo.git // do changes git commit -m"bad1" // do changes git commit -m"bad2" git reset --hard HEAD^4 // Why does it let me do this? // I just "broke" my local repository, because if I continue // do changes git commit -m"good1" git push origin master // f

Re: git reset respect remote repo (make git idiot proof)

2012-10-03 Thread Geoffrey De Smet
Op 03-10-12 16:59, Ramkumar Ramachandra schreef: Hi Geoffrey, Geoffrey De Smet wrote: [...] The following commands are ok to do (because I have 2 unpushed commits): git reset --hard^1 git reset --hard^2 but these are not and should be prevented (unless forced): git reset --hard^3 git

Re: git reset respect remote repo (make git idiot proof)

2012-10-04 Thread Geoffrey De Smet
Op 03-10-12 18:52, Andreas Schwab schreef: Geoffrey De Smet writes: Suppose this case: git clone .../blessedRepo.git // do changes git commit -m"bad1" // do changes git commit -m"bad2" git reset --hard HEAD^4 // Why does it let me do this? Because there is nothing wro

Re: git reset respect remote repo (make git idiot proof)

2012-10-04 Thread Geoffrey De Smet
Op 03-10-12 18:40, Phil Hord schreef: But I feel your pain. I think the solution lies in relegating 'reset' to the plumbing or the power-user realm of commands since I feel it is quite overloaded and sometimes dangerous. There was a thread some months back heading in this direction, but I fail