The escalating environmental consequences of software development have raised a concern for sustainable software engineering throughout the life cycle. Green software engineering aims at reducing the power utilization in software systems as well as containing the carbon impact of software systems, and managing the resources properly. This survey also summarizes the major approaches to integrate sustainability into each phase the following phases are sustainable requirements engineering, energy-aware coding, green DevOps, and sustainable data management. Sustainability is further improved by ideas such as energy efficient design patterns, resource efficient algorithms, and dynamic resource scaling. It also covers some of the recent tools for energy profiling, green deployment and green cloud computing. The goal of this paper is to give some idea of the state of sustainable software engineering practices, potential future developments, and to point out where research, automation, and policy may be needed to promote the adoption of such practices.