I want to push the local branch to GitHub.

Asked 2 years ago, Updated 2 years ago, 82 views

I would like to push each local branch (feat/knockout) remotely, is it possible?
Please tell me how to do it.

Enter a description of the image here

Is the following correct understanding of the push command?

$git push origin master
$ git push origin feat/knockout

Enter a description of the image here

git github

2022-09-30 21:34

1 Answers

While checking out to the feat/knocout branch locally, execute the following command:

$git push-u origin feat/knocout

-u origin is an option that specifies which remote repository to track, and if it is a repository that you manage, it usually specifies origin.This option allows you to skip the next specification (only git push can push).

P.S.
"Knoc kout" is spelled correctly.If you want to modify the branch name, check out to another branch and

$git checkout master
$ git branch-m knocout knockout


2022-09-30 21:34

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.