1 Samuel 17:15

15 but David went back and forth from Saul to feed his father's sheep at Bethlehem.

1 Samuel 17:15 In-Context

13 The three eldest sons of Jesse had followed Saul to the battle; the names of his three sons who went to the battle were Eliab the firstborn, and next to him Abinadab, and the third Shammah.
14 David was the youngest; the three eldest followed Saul,
15 but David went back and forth from Saul to feed his father's sheep at Bethlehem.
16 For forty days the Philistine came forward and took his stand, morning and evening.
17 Jesse said to his son David, "Take for your brothers an ephah of this parched grain and these ten loaves, and carry them quickly to the camp to your brothers;
New Revised Standard Version Bible, copyright 1989, Division of Christian Education of the National Council of the Churches of Christ in the United States of America. Used by permission. All rights reserved.