Can't see remote branch

I'm stil learning git and not sure how some basic things work. I created a local branch by doing:

git branch AppStore

I can't remember exactly how I pushed this branch to, but I can see MyBranch on the repository. When I do

git branch -a

I see this:

* AppStore
  remotes/origin/HEAD -> origin/master

There are more remotes listed as well. So from my computer where I created the branch, I see the AppStore branch. However, none of my coworkers can. When we tried a

git pull origin AppStore

It grabbed the changes. But when we tried

git checkout AppStore 
git checkout origin AppStore

We were not able to. What are we missing? Thanks!


I did try this according to VonC's answer:

git push --set-upstream origin AppStore

After putting in my credentials, I get:

Branch AppStore set up to track remote branch AppStore from origin.
Everything up-to-date

But my coworkers still cannot see the branch :-.


You need to publish your branch on your upstream repo, while tracking it locally (making sure your local branch keep in synch with that new remote branch: see "What is a tracking branch")

git push --set-upstream origin AppStore

As mentioned in the comments, the other developers need to fetch what has been pushed (included the new branch). A git fetch origin is one way, but if you are unsure of the name of the remote repo, a git remote update works just fine.

That will update their remote branches, but won't create a local branch of the same name, as detailed in "Track all remote git branches as local branches".

When you do a git branch xyz it creates a branch xyz on your local machine. Generally you create a new branch off the master branch so that it has the master's code. After creating the branch xyz, you make changes and then you have to git push origin xyz for the branch to be visible on github.

Doing git branch -a will show your branches in your machine. Till you push your branch you cannot find it on the remote repo.

Need Your Help

Fastest way to implode an associative array with keys

php arrays query-string associative-array implode

I'm looking for a fast way to turn an associative array in to a string. Typical structure would be like a URL query string but with customizable separators so I can use '&' for xhtml links ...

Nearest neighbors in high-dimensional data?

algorithm language-agnostic search machine-learning nearest-neighbor

I have asked a question a few days back on how to find the nearest neighbors for a given vector. My vector is now 21 dimensions and before I proceed further, because I am not from the domain of Mac...