Don't.
Furthermore, most code submission portals professors use run an automatic code comparison tool. If you and another student copied code from one another the professor will automatically get a report.
Also be careful to make your submission code private. If you put it on a public repository and someone copies your code without your knowledge or approval, you may still be held accountable and docked points.