Bristol City climbed off the foot of the Championship table with a vital 5-3 win over in-form Barnsley on Saturday.