Problems in the use of git

: $ git push origin mybranch
: $ git merge origin/mybranch
: $ git checkout -b mybranch origin/mybranch
: git push origin :mybranch-sharp-sharp-sharp 

what does it mean to take a remote branch and break up a new branch
Why does the last one delete a remote branch?

Git
Aug.11,2021

question 1:

take the remote branch and break up a new branch, which means pulling the branch of the remote remote version library origin locally.

git

my-branch
clipboard.png

git checkout -b local-my-branch origin/my-branchcheckoutlocal-my-branch
clipboard.png

question 2:

first of all, you need to figure out what each parameter represents git push .

$ git push <> <>:<>

git push origin: mybranch : means that an empty local branch is pushed to a remote mybranch branch, which is equivalent to deleting a remote mybranch branch.

$ git push origin :mybranch
-sharp 
$ git push origin --delete mybranch
Menu