create remore git branch 1

create remore git branch

// Example for creating a new branch named myNewBranch
git checkout -b myNewBranch

// First Push
git push --set-upstream origin myNewBranch

Here is what the above code is Doing:
1. git checkout -b myNewBranch: This creates a new branch named myNewBranch and switches to it.
2. git push –set-upstream origin myNewBranch: This pushes the new branch to the remote repository.

Similar Posts