How to pull updates from a forked repository?

I have forked another GitLab repository. So now I have a copy, and it seems to “know” where it came from.

How do I pull recent updates from the other repo into my fork? On the command line I would (having cloned a repo) do

   git fetch
   git pull

It’s probably my brain, but I cannot see how to do this on the GitLab UI. Any help appreciated!

@dan1 check out this article on Repository Mirroring. Only available for Enterprise users:

Obviously, you can do this locally with the commands you used in the OP, but to do it via UI appears to require Repo Mirroring


Thanks - I was kind of starting to conclude that too. Not quite what I was looking for. It seems a bit odd as there is no simple setting to say “mirror the repo I forked” you type in a complete repo URI from scratch. I.e. I have forked repo A, but can then set it up to mirror repo B? And it wants a separate password. Surely, if I had permissions to fork repo A, I also can pull?

It also dies with an error 500 when I try it ( and seems generally a bit shaky.

Any idea why there is not just a “Pull” button somewhere?

Just to clarify, Repo Mirroring is not what you’re looking for, you want to be able to:

Fork a Repo on
Have a UI button that you press to Pull from the origin repo into the forked repo to have it be up to date?

I can see why there may not be this functionality built in, as a pull like that could be destructive to your forked repo depending on the changes that have happened at origin.

Hence, with mirroring there is a check every hour that is done to keep the fork up to date and avoid merge conflicts.

Do I have your use case down right?


Yes, that’s roughly what I was expecting to be able to do by forking one GitLab repo to another, and I could then update the copy with ongoing changes from the original.

Rather like if I clone a repo from the command line, I can then “pull” and (if I have permissions) “push” to the origin, which is automatically set to be the repo I cloned.

I agree that if incompatible edits are made the two places then it will break (well, have merge conflicts that need solving), but that’s life, right? Removing the “pull” command would not be a solution :slight_smile:

Looks to me like the mirror function is designed to mirror a non-GitLab repo into GitLab, presumably so you can use GitLab features on it but are not expecting to do any edits, you just want a running copy? (the UI for doing mirroring seems to take no notice of the fact you’re on a forked repo).

@dan1 Thank you for the clarification. It doesn’t seem to be available in GUI form currently. However I don’t see any Issues / Feature Requests related to this, which makes me think that this concept either already exists in GitLab Flow or maybe you’re just too future for us :yum:

In all honesty, I think this would be a phenomenal feature request. Not just because I like the feature idea, but also due to the discussion it could foster on how we’re dealing with forking in general.

If we can do MRs from UI, why not things like Pulls, Pushes, and Fetches? :man_shrugging:

I must be just thinking in a different way to everyone else due to my inexperience :slight_smile:

Found this very informative page with a nice diagram which illustrates that while a lot of pull and push goes on between Github/lab and local machines, this never happens between the repos on the Gitlab/hub:

Hence no need for what I was thinking of, I guess.