Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8848815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:29:42+00:00 2026-06-14T12:29:42+00:00

I have a git repository with long and strange history. I don’t know what

  • 0

I have a git repository with long and strange history. I don’t know what the developers did with this repository and cannot control what they are doing with it now.

But I need to clone this repository (for redmine integration) and fetch all changes periodically.

What do I do:

git clone --bare git@git.server.com:/opt/git/repo
cd repo.git
git log

Now I can see all commits. Fine.

Next a developer make a commit in the main repository and I want to fetch all changes (all brances, tags and so on, and so on):

> git fetch --all 
Fetching origin
remote: Counting objects: 18, done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 14 (delta 5), reused 0 (delta 0)
Unpacking objects: 100% (14/14), done.
From git.gmcs.ru:/opt/git/ecco
 * branch            HEAD       -> FETCH_HEAD

But if a ask the commit history I didn’t see that last commit which was made in the main repository. Why ?

If I post not enough information I am ready to give you all the needed.

Thanks in advance.

Updated

Here is a brach information in the original repsitory:

git branch -a
  one
  test
* master
  release

Here is a branch information in the cloned repository:

git branch -a
  one
  test
* master
  release

I can see last commits in the master branch of original repository, but can not find them in the master branch of cloned repository.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T12:29:44+00:00Added an answer on June 14, 2026 at 12:29 pm

    You should use git pull

    or run git merge after fetch to get fetched changes

    if you have a bare repository you can not do a pull, because a pull wants to merge with HEAD, which a bare repo does not have.

    to update bare repository you can add it as remote to non-bare repository and push to it.

    But I think --mirror instead of --bare will work for you as is.

    Compared to –bare, –mirror not only maps local branches of the
    source to local branches of the target, it maps all refs (including
    remote branches, notes etc.) and sets up a refspec configuration such
    that all these refs are overwritten by a git remote update in the
    target repository.

    and then you can use git remote update to update mirrored repository

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Long story short*, I did some things with my git repository that I don't
Suppose I have Git repository like this: git-repo/ directory_1/ directory_2/ directory_3/ This has a
I have a private git repo with a long history. Now I'd like to
I have a git repository - including different tech. Android and iPhone. The folder
I have a git repository that I'm trying to delete all files and folders
I have a Git repository in bitbucket and another on my live rails server,
I have a git repository hosted on BitBucket, and have set up SSH authentication
I have a git repository I originally used with msysgit , but now I've
We have a git repository which contains source for a few related Java WARs
I have a git repository (at github.com) with two branches: master and gh-pages. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.