The response of species to climate change is among the main questions in ecology and evolution. Faced with changing conditions, populations may respond by adapting, going extinct or migrating. Fine-scale environmental variation offers a unique mosaic to explore these alternatives. In this work, I consider multiple ecological surveys, field experiments and molecular methods that have been used to study these range of possible responses. For instance, I first discuss whether fine-scale environmental heterogeneity may impact gene flow. I also refer to a combined approach that looks at the selection, heritability and genomic architecture of relevant traits, as well as genomic divergence across the environmental mosaic. In this way, it is possible to make informed predictions such as what genomic regions may relate to growth and fitness traits, and which regions in the genome harbor genetic variation associated with the fine-scale environmental variation. Overall, fast-evolving microhabitat-driven genomic divergence and, at the same time, genetically-based trait variation at a larger scale may play a role for the ability of species to persist in diverse and variable conditions.