I was working on my work computer the other day and set up a new branch in github. I made a local and remote branch.
Today I am working on my laptop at home and I don't see my branch that I made when I run "git branch".
How do I get access to this branch?
assuming you have this branch in your local repository, you can use git checkout <branchname> to checkout a branch
If this branch is on the github repository but not in your local repository, you may want to git remote update before git checkout <branchname> and git pull to fetch changes
What seems to have happened here, is that your local cache of the remote state is outdated. Before you can access these new branches you will need to refresh your local copy of the repository's state.
You can do this with:
git remote update (see the earlier answer by Michael Ira Krufky)git fetch [remotename]Additionally when you run git pull this automatically includes a git fetch so that would also update your local copy
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With