Home git with the rest of the branch in Hithabe does not appear

with the rest of the branch in Hithabe does not appear

Author

Date

Category

made Fork, cloned the repository, created a branch, now when I do Git Push on Githabe, the branch does not appear.

But after I made Git Push --all appeared.

So should be?


Answer 1, Authority 100%

Create branches can also be different commands and with different options transmitted to the commands (also related configuration options affect this process. See man git-config ).

  1. If you created a branch of the branch command :

    $ git branch new-branch
    

    then you did not switch to this branch, the current branch remained that it was before the execution of this command. Accordingly, the push command (without additional options / arguments), you tried to send changes from the current branch, which is most likely already available in the remote repository.

  2. If you created a branch of the Checkout command with the -b option:

    $ git checkout -b new-branch
    

    The switching to the new branch should have happened. But in this case, the push command (without additional options / arguments) was supposed to return the type of type:

    $ Git Push
    Fatal: The Current Branch New-branch of HAS No Upstream Branch.
    To Push The Current Branch and Set The Remote As Upstream, USE
      Git Push --Set-Upstream Origin New-branch
    

    i.e., it would be necessary to specify an additional option (suggested right in an error message) to bind a new branch to the eponymous branch in a remote repository.

When you executed the push command with the option - All , then, no matter what branch is at this moment current, the program git tried to create all the missing branks in the remote repository and send local changes to them. But missing bindings (see clause 2 above) In this case, the git program will not create: they need to be created manually to subsequently it could be from a new branch to execute the push command without additional options / Arguments.


ANSWER 2, AUTHORITY 11%

http://rogerdudler.github.io/git-guide/index. ru.html

Create a new branch with the name "Feature_x" and switch to it can be command

git checkout -b feature_x

Switch back to Master

Git Checkout Master

Remove the branch

Git Branch -D Feature_X

branch will not be available to those who use with you remote repository until you send it there
Git Push Origin & LT; Little Name & GT;

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions