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
4
votes
1 answer

Git repositories sync

How can I keep two git repository synced? The first repository is a "central" repository used by the team to push changes, created following the git book guide. The second repository will be only a mirror of the first. I'm using git with ssh and…
lifeisfoo
  • 15,478
  • 6
  • 74
  • 115
4
votes
4 answers

Git: can't push {n/a (unpacker error)}

I have created a bare repo in my local machine[Windows OS] and installed gitolite as well. When i tried to push the changes to the bare repo, i am getting the following error: $ git push origin master Counting objects: 3, done. Writing objects:…
Vikramsai
  • 81
  • 1
  • 1
  • 6
4
votes
2 answers

How to clone an existing Git repository to a remote Gitolite server?

I am using Gitolite on a remote machine to access my repositories. Remote -> Local Normally everything works fine: I create a new repository on the remote machine, clone it to my local machine and start working. Local -> Remote Now I have a local…
JJD
  • 50,076
  • 60
  • 203
  • 339
4
votes
2 answers

Git mailmap on bare repository

I set up a .mailmap file in my git repository, so now running git log --format="%aE" in my local repo correctly maps all email addresses as specified in the .mailmap file. But after I push to my bare repo and run the same command on the server,…
Josh Buell
  • 606
  • 5
  • 12
4
votes
1 answer

Using git to manage a production web site?

I have a web site with about 15,000 files on a production server. A remote developer is now doing the bulk of the work on the site, but I occasionally need to make some edits also. It is apparent that we need some version control, and so I am…
Derrick Miller
  • 1,860
  • 3
  • 21
  • 37
4
votes
2 answers

git server with eclipse project

I have a computer running Ubuntu Server. On this computer I have a user named mattgit. I have another computer running Windows 7. I develop Java applications in Eclipse on this computer. On my server, I have run "git init --shared --bare" to…
Matthew G
  • 1,090
  • 2
  • 14
  • 23
3
votes
1 answer

git init --bare on git 1.5.4.3

We have got git 1.5.4.3 (Version from Feb'08) on our server. As it seems, there was no option --bare back then. How can I create a bare repository then? Creating it locally and scp'ing it to the server would be an option, but way too much effort. Or…
fabb
  • 11,660
  • 13
  • 67
  • 111
3
votes
2 answers

How to check status of bare repo in git

I have a bare repo cloned and need to check if the repo is broken. I tried running git status, but it says: fatal: this operation must be run in a work tree. I have also tried running git gc and it returns non-zero if the repo is broken. But this…
Muni
  • 31
  • 2
3
votes
2 answers

How to create a git clone for viewing only

We're using git as our VCS for a small development team. I keep the main repository on our server as a bare git repository. Management and people not involved with the project need to be able to see the code and documentation without knowing…
mjohnson
  • 33
  • 1
  • 6
3
votes
1 answer

What is the use of git bare repositories?

On the remote machine I create a bare repository with the following command: git init --bare $HOME/bare/My-Repo On my local machine I clone a repo (but not the one that I have created on the remote machine): git clone…
Roman
  • 124,451
  • 167
  • 349
  • 456
3
votes
1 answer

Git: Pulling changes into a newly cloned bare repository from an existing (similar) repository

I was originally working on a repository (say /path/to/d_orig) and maintaining versions on it using Git. I wish to move into a newer version of the repository which has been updated by others and contains some major changes. In order to keep my…
dyno8426
  • 1,179
  • 2
  • 13
  • 22
3
votes
1 answer

Git push "write error: Operation not supported"

I have a bare git repo on a samba share server which my team are able to push to but when I try to push I get the error: remote: fatal: sha1 file './objects/pack/tmp_pack_' write error: Operation not supported error: unpack…
fham_526
  • 121
  • 8
3
votes
1 answer

git reset --hard equivalent on bare repository

After last commit my team decided remote has grown too heavy and would be better to make a new one to split tasks between asset testing (heavy repo) and functionality testing (light repo). So I made a push --mirror and created a new repo, but it is…
user3081123
  • 425
  • 6
  • 15
3
votes
2 answers

Create a git bare repo from two existing repository

I am developing code with another programmer. Since at the beginning I had to add new modules without modifying the existing code, I copied the source code of the other programmer and I started to develop mine. Since I always work with git, I set up…
user2152032
3
votes
4 answers

Is Git bare repository worth creating for a single user?

Is there any advantage to have a bare repository, if I am the only user of the repository?
rjss
  • 935
  • 10
  • 23