remote-branch

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

ぐ巨炮叔叔 提交于 2019-11-27 04:55:01
问题 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.) 回答1: For the vast majority [1] of visitors here, the correct and simplest answer to the question "How do I list all remote branches in Git 1.7+?" is: git branch -r For a small minority [1] git branch -r does not work. If git branch -r does not work try:

fatal: The upstream branch of your current branch does not match the name of your current branch

安稳与你 提交于 2019-11-27 00:16:59
问题 After doing a checkout of the remote branch releases/rel_5.4.1 using the Git GUI, I'm seeing this unexpected error message when I try to push : fatal: The upstream branch of your current branch does not match the name of your current branch. To push to the upstream branch on the remote, use git push origin HEAD:releases/rel_5.4.1 To push to the branch of the same name on the remote, use git push origin rel_5.4.1 I don't know what Git is talking about. I probably want to push to origin

What are the differences between git remote prune, git prune, git fetch --prune, etc

痞子三分冷 提交于 2019-11-26 21:14:01
My situation is this... someone working on the same repo has deleted a branch from his local & remote repo... Most people who have asked about this kind of problem on Stack Overflow, or other sites have the issue of branches still showing in their remote tracking branch list git branch -a at the bottom: * master develop feature_blah remotes/origin/master remotes/origin/develop remotes/origin/feature_blah remotes/origin/random_branch_I_want_deleted However, in MY situation the branch that shouldn't be there, is local: * master develop feature_blah random_branch_I_want_deleted remotes/origin

Git checkout: updating paths is incompatible with switching branches

假装没事ソ 提交于 2019-11-26 19:10:35
My problem is related to 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 'origin/remote-name' which can not be resolved as commit? If I manually create a branch and then pull the remote branch, it works, just as making a new clone and checking the branch out. Why does it not work on the repository I work with? user167628 I believe this occurs when you are trying to checkout a

Git: which is the default configured remote for branch?

余生长醉 提交于 2019-11-26 18:45:27
问题 I have a remote bare repository hub . I work only in the master branch. The last sentence of this error message below makes me wonder: How do I find out which is the "default configured remote for your current branch" ? And how do I set it? [myserver]~/progs $ git remote -v hub ~/sitehub/progs.git/ (fetch) hub ~/sitehub/progs.git/ (push) [myserver]~/progs $ git branch -r hub/master [myserver]~/progs $ cat .git/HEAD ref: refs/heads/master [myserver]~/progs $ git pull hub You asked to pull from

Why does Git tell me “Not currently on any branch” after I run “git checkout origin/<branch>”?

。_饼干妹妹 提交于 2019-11-26 16:43:09
I was trying to follow the instructions from Git: "Not currently on any branch." Is there an easy way to get back on a branch, while keeping the changes? but git checkout appears to be broken: $ git checkout origin/web-zach HEAD is now at 1366cb1... Changed so css files not ignored $ git status # Not currently on any branch. # Untracked files: # (use "git add <file>..." to include in what will be committed) # # .cordova/config.xml # www/languages/pt/sounds/ nothing added to commit but untracked files present (use "git add" to track) More specifically, I'm worried about the "Not currently on

Why does Git tell me “Not currently on any branch” after I run “git checkout origin/<branch>”?

我们两清 提交于 2019-11-26 08:52:47
问题 I was trying to follow the instructions from Git: "Not currently on any branch." Is there an easy way to get back on a branch, while keeping the changes? but git checkout appears to be broken: $ git checkout origin/web-zach HEAD is now at 1366cb1... Changed so css files not ignored $ git status # Not currently on any branch. # Untracked files: # (use \"git add <file>...\" to include in what will be committed) # # .cordova/config.xml # www/languages/pt/sounds/ nothing added to commit but

How do you remove an invalid remote branch reference from Git?

血红的双手。 提交于 2019-11-26 08:38:30
问题 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 list public : $ git remote show origin How can I delete \'remotes/public/master\' from the branch list? Update, tried the git push command: $ git push public :master

What are the differences between git remote prune, git prune, git fetch --prune, etc

▼魔方 西西 提交于 2019-11-26 07:50:49
问题 My situation is this... someone working on the same repo has deleted a branch from his local & remote repo... Most people who have asked about this kind of problem on Stack Overflow, or other sites have the issue of branches still showing in their remote tracking branch list git branch -a at the bottom: * master develop feature_blah remotes/origin/master remotes/origin/develop remotes/origin/feature_blah remotes/origin/random_branch_I_want_deleted However, in MY situation the branch that

Git checkout: updating paths is incompatible with switching branches

送分小仙女□ 提交于 2019-11-26 06:50:24
问题 My problem is related to 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 \'origin/remote-name\' which can not be resolved as commit? If I manually create a branch and then pull the remote branch, it works, just as making a new clone and checking the branch out. Why does it not