public String getRemoteCommit ( String branch ) throws Exception { fetch ( ) ; ObjectId commit = localRepo . resolve ( "origin/" + branch ) ; if ( commit != null ) return commit . getName ( ) ; else return null ; }
Get remote HEAD commit .