1

Can anyone please let me know how I can create new branch on GitHub, and push code over there.

Finally, I want to merge all the code in the main file.

House
  • 3,356
  • 2
  • 25
  • 29
  • 1
    It's unclear what specifically you're trying to achieve, but there are plenty of git tutorials e.g. on GitHub itself: https://docs.github.com/en/get-started/quickstart/hello-world. Please take the [tour] and read [ask] before posting on SO. – jonrsharpe Jan 04 '22 at 16:54
  • Does this answer your question? [How do you create a remote Git branch?](https://stackoverflow.com/questions/1519006/how-do-you-create-a-remote-git-branch) – Ron Jan 05 '22 at 15:57
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jan 13 '22 at 19:25

1 Answers1

0

If you want to merge the code on main from a branch on GitHub, that is called a PR (Pull Request)

You can create one on GitHub from your workstation, using GitHub gh CLI (to be installed first).

See gh pr create

When the current branch isn't fully pushed to a Git remote, a prompt will ask where to push the branch and offer an option to fork the base repository.
Use --head to explicitly skip any forking or pushing behavior.

So make sure to work locally on a branch which is not main.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250