Questions tagged [git-fetch]

git-fetch - Download objects and refs from another repository

The git command fetch retrieves changes done in a remote repository.

It will not merge the changes automatically into your local branches, use git pull for this or merge from the origin-branch after doing fetch.

See the man page for full details.

397 questions
5
votes
1 answer

Git progress watch while pulling / fetching

Here is my problem: When I'm doing pull/fetch of some big repository i want to show progress somewhere else than in console (for example on website) I know that in git 1.7.1.1 there is option --progress but I can't use this version and must stay…
dfens
  • 5,413
  • 4
  • 35
  • 50
5
votes
1 answer

Git fetch failing using jgit: Remote does not have available for fetch

I have a bare repo located at main.git and am trying to fetch a branch (foo, let's say) in another repo, test, which has only just been git init'd: fetchtest/ |- main.git/ |- test/ |- .git/ Using regular git commands, I can do a git…
Callum Rogers
  • 15,630
  • 17
  • 67
  • 90
4
votes
3 answers

How to preview changes before git pull

I want to check the changes that will done to the files after I run git pull. I know we use git fetch to retrieve new objects from remote repository without changing local repository. But how can I view these changes in editor ?
Paras Gupta
  • 264
  • 3
  • 11
4
votes
1 answer

How does Git calculate commits to fetch

I know what git fetch does and how this command is used. I am interested in the internals: how does Git determine the exact commits to transmit? For example for the situation below local repo: A - B - C - D master \ \- E - F feature1 \-…
Krzysiek Karbowiak
  • 1,655
  • 1
  • 9
  • 17
4
votes
2 answers

Why does git fetch origin master:master fast forward the local branch?

I have been playing around with git and stuck with concepts of git fetch. I have tried and observed following scenarios: 1) $ git fetch All the remote branches are fetched and all the corresponding remote-tracking branches are updated. I understand…
4
votes
3 answers

Why git fetch does not create local branches?

From what I understand, whenever you run git fetch remote objects are downloaded locally and a lightweight pointer named FETCH_HEAD to the HEAD commit of the remote branch is created. Since a branch is simply a pointer, how is this different from…
Simón Ramírez Amaya
  • 2,436
  • 2
  • 14
  • 31
4
votes
1 answer

GIT download pull request files changed

I'm trying to just download the changed files in PULL REQUEST in GIT for deployment purpose. Could you please help me figuring out the best way. For now, develop is my default branch. git clone https://mygitreposerver.net/EWE/mygitrepo.git cd…
Manu Batham
  • 331
  • 1
  • 14
4
votes
2 answers

How to clone, then sync/update/push a fork with the upstream master

I think I've read through some of the tutorials and I'm stuck on something entirely basic (I hardly ever use the commandline git, so please be patient ;)). All I want to do is update my fork (https://github.com/abelbraaksma/visualfsharp) to the…
Abel
  • 56,041
  • 24
  • 146
  • 247
4
votes
1 answer

What is the exact difference when you execute `git fetch upstream master:master` vs `git pull upstream master:master`

I know the difference between git fetch and git pull. git pull is basically a git fetch + git merge in one command. However, I was researching on how to update my fork (master branch) with the upstream without checking out the master branch. I came…
ARK
  • 3,734
  • 3
  • 26
  • 29
4
votes
4 answers

How to see changed files after calling git fetch

If two people are working on the same repository on github and the same branch master. Then say person A pushes their change to master and I as person B, how do I check the files changed in after calling git fetch? If I do: git fetch git merge…
hidar
  • 5,449
  • 15
  • 46
  • 70
4
votes
3 answers

Git find modified files since from a shallow clone

I'm on a CI box running tests. To speed it up, I'm just doing a shallow clone: git clone --depth 1 git@github.com:JoshCheek/some_repo.git Assuming all the tests pass, I want to trigger the next step in the pipeline. What to trigger is based on…
Joshua Cheek
  • 30,436
  • 16
  • 74
  • 83
4
votes
3 answers

Can "git fetch" be told not to use "git upload-pack" for local repositories?

When using git fetch to fetch refs from one (very large) repository to another one on the local machine, git upload-pack takes a very long time to create pack files. In the local case there's not such a need to minimize the amount of data…
Mark Longair
  • 446,582
  • 72
  • 411
  • 327
4
votes
0 answers

git fetch --all - extra branches being created

I've got my USB stick set up as a git repo (don't ask why) but I just did a git fetch --all and got these messages: 38ea2b1..2b4fdaf master -> usb/master * [new branch] usb/branch/A -> usb/usb/branch/A * [new branch] usb/branch/B…
Snowcrash
  • 80,579
  • 89
  • 266
  • 376
4
votes
1 answer

How does Git determine what objects need to be sent between repositories?

I have looked here but couldn't quite figure out the things I was wondering about: how does git push or git pull figure out what commit objects are missing at the other side? Let's say we have a repository with the following commits: (letters stand…
Silly Freak
  • 4,061
  • 1
  • 36
  • 58
4
votes
4 answers

Temporarily using a different protocol with remote repository

I've on my laptop a git repository, and a remote repository on GiHub (a straight forward configuration created when running 'git clone'). I'm using the SSH transfer protocol. i.e. remote address is: git@github.com:MyName/MyProg.git I'm now in a…
Uri London
  • 10,631
  • 5
  • 51
  • 81