Genesis 46:31

And Joseph said unto his brethren, and unto his father’s house, I will go up, and shew Pharaoh, and say unto him, My brethren, and my father’s house, which were in the land of Canaan, are come unto me;

Joseph told his brothers and his father's household that he would go up to Pharaoh to inform him that his relatives from Canaan had come to him, as preparation for bringing them before Pharaoh. As part of that preparation he counseled them to declare openly to Pharaoh that their occupation was tending livestock. He gave this direction because shepherding was regarded as degrading and despised in Egypt, so Pharaoh would be unlikely to press them into service for the crown. The aim was that they would instead be permitted to dwell in Goshen, where there was good pasture for their flocks and where they could worship God separated from Egypt's idolatrous rites. In this way the Israelites continued settled in and around Goshen until God led them out of Egypt.