Questions tagged [git-bare]

A bare git repository is so named because it has no working directory; it only contains files that are normally hidden away in the .git subdirectory. In other words, it maintains the history of a project, and never holds a snapshot of any given version.

From Git Magic, Chapter 3:

A bare repository is so named because it has no working directory; it only contains files that are normally hidden away in the .git subdirectory. In other words, it maintains the history of a project, and never holds a snapshot of any given version.

A bare repository plays a role similar to that of the main server in a centralized version control system: the home of your project. Developers clone your project from it, and push the latest official changes to it. Typically it resides on a server that does little else but disseminate data. Development occurs in the clones, so the home repository can do without a working directory.

Converting:

186 questions
0
votes
1 answer

How to update a "relay" repository?

I am working on two machines (one is "local" and another one is "remote"). I did the following set up: On the "remote" machine: git init --bare repo1 On the "local" machine: git clone ssh://rep1 On the "local" machine: git remote add rep1…
Roman
  • 97,757
  • 149
  • 317
  • 426
0
votes
1 answer

How to clone bare repository hosted on AWS Code Commit?

I have a repository currently being hosted on AWS Code Commit, however in console all I see is a working tree. I don't see the bare project.git directory I would reference when cloning the bare repo using the following: git clone --bare…
Don P
  • 2,819
  • 7
  • 33
  • 64
0
votes
2 answers

Add git repository to existing folder on VSP

My Setup looks like this: Bare Repo in my Root /srv Folder Local Repo on my PC Gitlab Repo on well Gitlab I added two origins (Gitlab and my Bare Repo) to push all changes from my local machine to the source. Now I want to set up a post-receive Hook…
Isengo
  • 1,744
  • 1
  • 18
  • 36
0
votes
1 answer

How can bare Git repository be ahead of my working repository?

I made a bare repository clone of my Git working repository. The remote bare repo is located on network drive and I have been pushing to it so I have backup on different physical media. I am now getting an error on an attempt to push to the bare…
JonN
  • 2,328
  • 4
  • 29
  • 43
0
votes
1 answer

Legality of executing git commits against a bare repository

I have a bare git repository on a server that is used as a central repository. I have installed a post-receive hook so that when a commit is pushed to this repository, the committed changes are deployed to a working directory on the same server with…
Booboo
  • 18,421
  • 2
  • 23
  • 40
0
votes
1 answer

Cloning/mirroring private Git repo for development

I'm in a development team doing some bugfixes for another company. The other company has our current code stored in their VCS, which is Git. However, only a few of us in the dev team have direct access to the Git repository via VPN. Now we want to…
Viktor
  • 403
  • 2
  • 7
  • 25
0
votes
1 answer

Read bare repo files on the fly

Is there a way of reading the files of a bare repo? For instance, I want to analyze each file and extract some features from a repository but without checking out the entire repo locally. P.S: ideally, want to use C# for this Thanks
Shmwel
  • 1,608
  • 4
  • 23
  • 40
0
votes
1 answer

Delete last push in git server

I deploy the code in one of my server with according to this tutorial: How To Set Up Automatic Deployment with Git with a VPS But now i have problems with some commit pushed to deploy server, some times the code inside of the githooks, make that…
aasanchez
  • 129
  • 1
  • 13
0
votes
2 answers

How can I setup a bare GIT repository that after pushes the new content is visible?

I have this scenario: A colleague of mine and I are working on the same branch (master) of a git project "xy". In order to make teamwork possible, i created a bare repository of the project and put it on a network drive which is accesible to both of…
0
votes
1 answer

Adding files to a bare directory not working

I need a bare repository that I publish to using VS2015. However, my publishing fails because there is already a "config" file created with the --bare command. This file is web.config I assume. I confirmed this by trying to just paste the files…
REMESQ
  • 1,080
  • 2
  • 26
  • 58
0
votes
1 answer

Get a tree of files in a bare git repo on at a specific commit

You can use git ls-tree --full-tree -r HEAD on a bare repo to get all the files in that repo, but I want that list for specific commits. I.e. I want to walk though a repo commit by commit from the first commit until I'm at HEAD and see how the file…
Joshua Olson
  • 3,018
  • 3
  • 21
  • 27
0
votes
2 answers

Git Bare repository fail. Missing necessary objects. Can't commit/push

About one month about I've created bare git repository. And over last month I've been committing my source changes from eclipse to that repository over SSH. The problem occurred today, when I tried to commit and push updates from eclipse. Here is…
masterdany88
  • 4,009
  • 8
  • 44
  • 114
0
votes
1 answer

git push does not update remote workdir

I do execute the following steps to create on DEBIAN Server 1) git bare repo; 2) a working dir, where the files are copied after local git push; 3) a local clone on Windows, bare server repo is cloned. I executed the following commands: # SERVER:…
klor
  • 953
  • 3
  • 9
  • 25
0
votes
0 answers

Intellij 14: Unable to create working repository from git "bare" repository

When I try to check out a Git non-working repository (created with the -bare option), Intellij doesn't create a working local repository but just clone the .git folder! So my question is how do you create a local working Git repository from a…
Lucas.de
  • 380
  • 6
  • 16
0
votes
2 answers

Bare git vs .git/ - purpose of config.bare

Background: I've created a bare repo cd ~ git init --bare GitDrive The idea was to use this as the git dir for google drive cd "Google Drive" echo "gitdir: ../GitDrive But git didn't like this until I removed bare = true from…
hultqvist
  • 14,837
  • 14
  • 59
  • 90