github branch in git

Asked

Viewed 47 times

0

I made a Fork of a project I’m doing in a group, in Github through the branch tabs I made 3 new branch, in my local repository in the Windows 10 operating system I type the git branch command to view the branches and branches of Github are not in the local repository, so I did the git pull origin main command to update the local repository and it seems to be up to date but still can’t access the branch that exists in github in git, so it’s unclear what I need to do to create the branch by git in the local repository? i wish to have the same Github branch in git. Thanks for the answers.

  • Assuming you have a branch feature-a in the remote repository and try to go to it in your local repository with git checkout feature-a, you can’t?

  • I can’t Rafael, I can’t understand why it seems that the branchs I created only exist on github, including I named them by the type of development I’m going to do, a database, one with php and the last with bootstrap, and I noticed that you gave a resource name, taking advantage of this I must make a branch for a resource instead of a whole development of several resources in a language?

  • Strange, the remote branch usually doesn’t show up even with git branch but you can give a git checkout after the git pull. On the other subject, the name and process for branch creation is opinion-based and varies according to the team that is working on the project, over time you can refine this for your needs if you realize that the initial idea has not turned out well, don’t overthink this - you can change your mind at any time.

    • main branch -> FETCH_HEAD Already up to date. it appears when I do the git pull origin main command
  • I’m using the git branch command to try to see the branchs I don’t know if this command is right for this purpose.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.