I was working on the main branch of a repository that has multiple commits. But now, I want to create a new branch to this repository where I can get all the commits and codes I have done and pushed to the main branch. How do I create a new branch to get all the commits from the main branch to the new one?
Thanks.