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:

197 questions
0
votes
1 answer

How to change git-bare repository location due to space issues?

I have a git-bare repository location under x:/Archivos Python/EPPTRA2.git/ and all the team is pulling and pushing changes from this repository. /x is a shared disk within our office network. Not enough space However recently I had to push many…
Cedric Zoppolo
  • 4,271
  • 6
  • 29
  • 59
0
votes
1 answer

What is exactly is the benefit of a bare Git repository over a normal Git repository?

I have read articles but still not understand when and where a bare Git repository is used? I am working on a project. For which use-case can I create another project with a bare repository and what will be the benefit of it? Is the only benefit…
Nits
  • 520
  • 6
  • 21
0
votes
0 answers

git: branch checkout with uncommitted changes errors out on only *some* files

I keep track of my dotfiles in a bare repo essentially as described here. When I want to make changes that will be shared between machines I make the change in whatever local branch corresponds to the machine I'm on; checkout master (where the…
grobber
  • 1
  • 1
0
votes
2 answers

Synchronize a distant server directory with a local git repositery

I want to synchronize a directory /home/myproject of my distant machine with, as source, the directory D:\myproject\ of my local machine. I would like to use git (to also benefit from commits history, etc.) I did this on distant machine (creation of…
Basj
  • 41,386
  • 99
  • 383
  • 673
0
votes
1 answer

Git hook/post-receive No such file or directory

So I've got a bare repository which we use to control the changes to our web pages. On that bare repo is a post-receive hook that runs when we push our changes to it. All the hook does is implement the changes to the working directory using the…
0
votes
0 answers

How to get git mirror to keep updated continually?

I want to back up my git master, which is set as bare as per the documentation. The git master is set up on a VM on premise. However I need to back up the master as it's a busy team and a large team, so if anything does go wrong with master we want…
David Boshton
  • 2,555
  • 5
  • 30
  • 51
0
votes
1 answer

Post-receive hook to /var/www/html and permissions

I created a wordpress staging remote on my Centos 7 VPS. Wordpress is installed in this directory /var/www/html and group/owner is the default apache:apache. Then I created a bare git repo on something like ~/git/repo and the post-receive with this…
R99Photography
  • 71
  • 1
  • 2
  • 10
0
votes
1 answer

Checkout all submodules from bare repo?

When I checkout the master branch of my bare repo using git --work-tree=/path/to/destination --git-dir=/path/to/bare/repo checkout -f It checks out the entire working branch, but not the contents of the submodules, only the parent directory of…
cclloyd
  • 8,171
  • 16
  • 57
  • 104
0
votes
1 answer

How to pull updates from a remote (bare) master repo at Bitbucket to a local bare master repo?

First, a (bare) master repo with the name "test" is created in Bitbucket. Then, a local bare master repo is created on a node with the ip 10.0.0.1: git clone --bare https://username@bitbucket.org/username/test.git Then, a local working repo is…
SOUser
  • 3,802
  • 5
  • 33
  • 63
0
votes
0 answers

Converting bare git repository into a copy where I can see the files

I need to convert a local bare git repository to another form where I can see the actual files. My repository is roughly 13.5GB in size. Essentially, the repository is in a state in which it would be if it were hosted on a remote server. I have a…
Idris.AH
  • 410
  • 1
  • 10
  • 22
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
  • 124,451
  • 167
  • 349
  • 456
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
  • 3,876
  • 10
  • 47
  • 76
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
  • 2,004
  • 3
  • 21
  • 43
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,498
  • 5
  • 33
  • 49
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
  • 38,656
  • 3
  • 37
  • 60