There are only a few ways to avoid taking damage from a firing line. The first is to grab a nearby foe and use them as a human shield. Second is to quickly duck into cover. The third is very difficult: you must charge the line and quickly attack whoever is closest to you.
Assassin's Creed III: Firing Line