I must admit that I've no idea what a "git reset --hard origin" does exactly, 
but you can compare the logs to see the differences.
Use "git reflog" to see the commit hash before the reset common, then you can 
do a
"git log <HASHISH>..HEAD"

and

"git log HEAD..<HASHISH>"

Where <HASHISH> is the hash-key you found with "git reflog"

This should give you a list of commits in one but not the other.

-
Morten

On Apr 22, 2013, at 7:22 PM, Carlos Pérez wrote:

> A friend did a "git reset --hard origin". He did that instead of going "git 
> reset --hard origin/branch_name" which is what he actually intended. After 
> that he pushed his changes.
> An hour later I did a "git pull origin branch_name" and a bunch of new files 
> were pulled from master; but in the local and remote logs we never see those 
> files being committed or any merge from master to our branch, or anything to 
> indicate us what occurred.
> 
> To try and reproduce it I did "git reset --hard origin" locally and got this 
> when doing "git status":
> # On branch my_branch 
> # Your branch and 'origin/my_branch' have diverged, 
> # and have 145 and 288 different commit(s) each, respectively.
> 
> So It seems that it reset the current branch to the state of the master 
> branch on origin, but I'd like to determine what happened just by looking at 
> the logs.
> 
> Thanks,
> Carlos.
> 
> -- 
> 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/groups/opt_out.
>  
>  

-- 
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/groups/opt_out.


Reply via email to