git-fetch

git fetch origin doesn't fetch all branches

不羁岁月 提交于 2019-12-05 14:09:38
问题 I read in the answers to this question that git fetch origin should fetch all branches of origin. In my case, it doesn't seem to give me any branches, though. Here's what I did: Initially, a remote called origin had 7 branches. I cloned it. git branch then returned only master . I did git fetch origin , and git branch still only shows master . How can I get the other 6 branches without fetching them individually? 回答1: You have all 7 branches, but git branch only shows local branches. Even

git fetch fails due to pack-object failure

孤人 提交于 2019-12-05 07:51:24
When I add our remote repository as upstream and try to fetch it , it fails as below : $ git fetch upstream remote: Counting objects: 11901, done. remote: aborting due to possible repository corruption on the remote side. error: pack-objects died of signal 9 error: git upload-pack: git-pack-objects died with error. fatal: git upload-pack: aborting due to possible repository corruption on the re mote side. fatal: protocol error: bad pack header I understand that it fails due to having huge files in the repository( which we do have) , but why does it Not fail when I clone the same repository?

Git fetch/pull have stopped working

筅森魡賤 提交于 2019-12-05 02:35:06
Git fetch and pull both stopped working yesterday on the server (AWS instance). $ git fetch ERROR: Repository not found. fatal: The remote end hung up unexpectedly There are two repository clones on that instance, both giving the same error. git still works well from local PCs. git remote -v gives the same results on local PC and on the server; ssh git@github.com works as it should ("Hi (name)! You've successfully authenticated, but GitHub does not provide shell access.") There's one difference in behaviour: git pull origin st +[Tab] used to expand to a branch name; now it expands to a name of

Are “git fetch --tags --force” and “git pull <branch>” conmutative operations?

南笙酒味 提交于 2019-12-04 18:06:55
Normally the git tags are a fixed reference to a commit. But sometimes they are used to mark some event ( last-build , base-line , etc..) and they change frequently. I have an script that refreshes those kind of "floating" tags from the reference repository. git fetch --tags --force and also make pull from one branch: git pull origin <mybranch> I know that many git users warn about using floating tags, but i am forced to deal with that. My question is: If the branch is marked by one of those floating tags... does the execution order of the commands matter? I am afraid that git pull doesn't

Why does git fetch via hudson fail, while git fetch via the command line works?

偶尔善良 提交于 2019-12-04 17:46:17
问题 I'm trying to fetch a read-only git repository from github and have it be built via hudson. This process is failing. This is the hudson output: Started by an SCM change Checkout:workspace / d:\hudson\home\jobs\gdcm-hudson\workspace - hudson.remoting.LocalChannel@19ba1d8 Using strategy: Default Checkout:workspace / d:\hudson\home\jobs\gdcm-hudson\workspace - hudson.remoting.LocalChannel@19ba1d8 GitAPI created Fetching changes from the remote Git repository Fetching upstream changes from git:/

How do I fetch a branch on someone else's fork on GitHub? [duplicate]

风格不统一 提交于 2019-12-04 07:21:21
问题 This question already has answers here : How to pull remote branch from somebody else's repo (6 answers) Closed 3 years ago . I've forked from a repo on GitHub. I want to get the code from a branch on another user's fork. Must I clone this user's whole repo to a separate local repo or can I do something like git checkout link_to_the_other_users_branch ? 回答1: $ git remote add theirusername git@github.com:theirusername/reponame.git $ git fetch theirusername $ git checkout -b

git fetch origin doesn't fetch all branches

淺唱寂寞╮ 提交于 2019-12-04 00:40:25
I read in the answers to this question that git fetch origin should fetch all branches of origin. In my case, it doesn't seem to give me any branches, though. Here's what I did: Initially, a remote called origin had 7 branches. I cloned it. git branch then returned only master . I did git fetch origin , and git branch still only shows master . How can I get the other 6 branches without fetching them individually? You have all 7 branches, but git branch only shows local branches. Even though you now have the branch data locally on your system, they are still considered "remote branches". You

Differences between git fetch and git fetch origin master

那年仲夏 提交于 2019-12-03 23:27:09
问题 I was doing a fetch/merge and wanted to know if there is any difference between doing git fetch and git fetch origin master I do not have any other branches and origin points to my remote repository on GitHub. When I do: git fetch origin master remote: Counting objects: 4, done. remote: Compressing objects: 100% (2/2), done. remote: Total 3 (delta 1), reused 0 (delta 0) Unpacking objects: 100% (3/3), done. From github.com:XXXXXXXXXXXXXXX * branch master -> FETCH_HEAD But just: git fetch From

Is there any reason to not set 'git fetch' to always use the --prune option?

若如初见. 提交于 2019-12-03 16:32:01
问题 Using git fetch --prune deletes local remote tracking branches when the branch on the remote machine has been deleted. Setting remote.origin.prune to true using the following... git config --global fetch.prune true ...makes using the fetch command always implicitly use the --prune option. I am putting together a best-practices/introduction to git for some developers in my group who aren't quite familiar with it. I want to be sure I know this is not a dangerous behavior before advising them to

Fetch a single tag from remote repository

妖精的绣舞 提交于 2019-12-03 12:10:48
问题 This command fetches all tags: git fetch origin --tags This command fetches a specific tag: git fetch origin refs/tags/1.0.0 But that doesn't let me do: git checkout tags/2.3.18 How can I fetch a single tag and then perform a checkout? 回答1: git fetch origin refs/tags/1.0.0 This fails because it doesn't write a local reference: it obtains the remote's refs/tags/1.0.0 , and any tag object(s), commits, etc., required to go with it; it drops those into FETCH_HEAD (as all git fetch commands always