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 ge0ffrey.s...@gmail.com writes: Suppose this case: git clone .../blessedRepo.git // do changes git commit -mbad1 // do changes git commit -mbad2 git reset --hard HEAD^4 // Why does it let me do this? Because there is nothing wrong

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

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

2012-10-04 Thread Junio C Hamano
Geoffrey De Smet ge0ffrey.s...@gmail.com writes: 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

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 -mbad1 // do changes git commit -mbad2 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 -mgood1 git push origin master // fails

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-03 Thread Phil Hord
On Wed, Oct 3, 2012 at 10:49 AM, Geoffrey De Smet ge0ffrey.s...@gmail.com wrote: Suppose this case: git clone .../blessedRepo.git // do changes git commit -mbad1 // do changes git commit -mbad2 git reset --hard HEAD^4 // Why does it let me do this? // I just broke my local repository,

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

2012-10-03 Thread Andreas Schwab
Geoffrey De Smet ge0ffrey.s...@gmail.com writes: Suppose this case: git clone .../blessedRepo.git // do changes git commit -mbad1 // do changes git commit -mbad2 git reset --hard HEAD^4 // Why does it let me do this? Because there is nothing wrong with that. // I just broke my local