remote-branch

Git checkout on a remote branch does not work.

My problem is related to: http://stackoverflow.com/questions/180064/fatal-git-error-when-switching-branch I try to fetch a remote branch with the command git checkout -b local-name origin/remote-name but I get this error message: fatal: git checkout: updating paths is incompatible with switching branches. Did you intend to checkout...

How do you Remove an Invalid Remote Branch Reference from Git?

In my current repo I have the following output: $ git branch -a * master remotes/origin/master remotes/public/master I want to delete 'remotes/public/master' from the branch list: $ git branch -d remotes/public/master error: branch 'remotes/public/master' not found. Also, the output of 'git remote' is strange, since it does not...

Git clone does not bring master branch

I have a remote repository http://github.com/fernandezpablo85/Test This repo has a master branch, but it's behind two other branches so when I clone it I get this warining: warning: remote HEAD refers to nonexistent ref, unable to checkout. And also I don't get a local master branch (git branch shows nothing). I can fix the whole...

git create branch with untracked files

I've a master branch with a .gitignore file with directory X listed in it. (X is not being tracked). When I try to add a branch tracking a remote using the command git checkout -b mybranch origin/mybranch The remote branch is tracking X directory, and hence this checkout fails with the error Untracked working tree file 'X' would be ...

How do I list all remote branches in Git 1.7+?

I've tried git branch -r, but that only lists remote branches that I've tracked locally. How do I find the list of those that I haven't? (It doesn't matter to me whether the command lists all remote branches or only those that are untracked.) ...

Unable to create Gitosis remote branches

Hi, When pushing branches to a gitosis hosted repository, although I get the expected response from the push command, the remote branches aren't listed when I do git branch -a. Even after a fetch, the branches still do not show up in the list. Interestingly, I find files with names that correspond to the branches I have been trying to p...

Head commit for all remote branches using Git

I know how to list the remote branches $ git branch -a And I know how to find the head commit hash of my current branch $ git rev-parse HEAD But I'm not sure how to list all the head commit hashes for all the remote branches. This is close to what I want but what order are they in? $ git rev-parse --remotes 4b9f7128e9e7fa7d72652b...

git: Why am I ahead of origin/master with X commits after I do 'git push'?

I am using a bare git repository on a server for backup, and push local changes there with 'git push' after doing 'git commit' locally. 'git status' tells me # On branch master # Your branch is ahead of 'origin/master' by X commits. If I modify a file, and then do another commit followed by a push, git tells me that my branch is ahe...

Push a branch of a git repo to a new remote (github), hiding its history

My organisation is preparing to release an open-source version of our software using github, however I'm not sure the best way to approach this: We have two branches master and release, master contains some proprietary components that we have decided not to release, and release contains the cleaned-up version that we want to distribute....