I've been watching a lot or ancient style shows/movies such as Vikings. In the large scale battles i found it very difficult to keep track of who was on what side as they were all wearing similar styled armour. Any historians on here care to shed some light on this matter?
Due to the organisation of medieval armies, occurrences of this would be very rare unless it was specifically intended for one reason or another. A "typical" late-medieval army would consist of a few different classes of soldiers and only only one of them, the bowmen, would really be capable of inflicting friendly fire on their own troops. As bowmen were usually deployed en masse and fired (mostly) in volleys when commanded, that would generally be avoided as troops were expensive to equip, train and replace.
In hand-to-hand combat it would be even rarer. In battle the melee combatants generally form a shield-wall or fight in formation. Soldiers would train for years to learn to do this effectively and knew that breaking the wall or formation would very likely lead to a quick death at the hands of an enemy. The vast majority of combatants would be career soldiers at this stage.
With regards to identifying troops on your side that might otherwise be mistaken for an enemy - that's one of the things standards, tabards and shield devices did - they identified your and your allies again your enemies. There were very often requirements for soldiers to be a part of a larger army - and that usually meant a specific set of equipment, which further tied the appearance of the entire force together. Lords and Kings didn't want their own troops to be confused and fight each other, remember.
In the pre-Medieval era (Migration through to the end of the Viking age) it was common to re-paint (or make new) shields when fighting with a larger force both as a display of strength (this Lord can summon X troops, all outfitted and matched for war) and also for identification. In these time periods however, most soldiers had another job to do when they weren't needed to fight, and these didn't all pay equally, or always very well. Equipment was more about functionality than matching and the bulk of the fighting forces in this time would use found, scavenged, or inherited equipment.
Melee would be my main concern. I'm sure troops would be wearing different emblems of sort (maybe!). Once they all got jumbled up in battle was it as simple as you kill who ever looks at you funny? I mean friendly fire in the sense of two guys on the same side not knowing each other and assuming they were enemies. I would assume this would be more common in large scale battles where not everyone would know each others faces.