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
1
vote
1 answer

git clone doesn't import all remote branches

After I clone from a bare git repository, my imported local repository doesn't have all the branches in it. Following is the architecture. Here are the steps how this bare repository came into being. I had an existing repository (a in the figure).…
Kashif Nazar
  • 20,775
  • 5
  • 29
  • 46
1
vote
1 answer

Pushed to git bare repo and I can't pull changes from other machines

I have a git repo on my Dropbox, I am using Ubuntu, I have a project which I've cloned via git clone blablabla/Dropbox/blablabla.git and I've pushed for like 500 times to that but all I can pull now from another machine is like first 400 also my…
Jacek Pietal
  • 1,980
  • 1
  • 18
  • 27
1
vote
1 answer

How do I create a bare repo clone of existing git working repo

I have been sole developer, working on a project with a local repository under git. Now I need to create a bare repo for collaboration on a local network. How do I do that?
GreenAsJade
  • 14,459
  • 11
  • 63
  • 98
1
vote
1 answer

Can I git clone non-bare repositories over http?

I am using lighttpd as my server and trying to clone my repositories over http. I am facing 2 issues: mv hooks/post-update.sample hooks/post-update dosent seem to do the trick, I have to manually run git update-server-info in each repo. Why is…
Mudassir Razvi
  • 1,783
  • 12
  • 33
1
vote
2 answers

How do I get a "Github bare" repo with wget

If I clone a Github Repository , I do normally a git clone https://github.com/:username/:repo_name.git. But now I've wanted to download the bare-Repo with wgetbut it only returns the webpage. How can I download a git repo with http? I thought this…
Sebi2020
  • 1,966
  • 1
  • 23
  • 40
1
vote
3 answers

How to create a pushable bare git repository that also pushes files?

I have in /f/gittest/foo (remote). I have in /f/gittest/bar (local). Since I don't need remote to be a working copy right now, mostly because I can't push into an active branch, I made it bare. I go through and create a .git…
BLaZuRE
  • 2,356
  • 2
  • 26
  • 43
1
vote
1 answer

git logs not matching when setting --work-tree with push-to-deploy post-receive hook

I have setup push-to-deploy with my production server by setting up a --bare directory at /home/ubuntu/push-to-deploy/test.git, using that as my remote and adding a hooks/post-receive inside the --bare looking like this: #!/bin/bash while read…
sadmicrowave
  • 39,964
  • 34
  • 108
  • 180
1
vote
1 answer

What is stored in bare repositories regarding submodules?

I'm trying to write a tool that inspects some git repositories. I wondered what information is stored in a bare repository that regards submodules? So far I assume that it's only the .gitmodules file. Would be nice if anyone could confirm this.
Onur
  • 5,017
  • 5
  • 38
  • 54
1
vote
2 answers

How can I create a branch on a bare repo in Git?

There are a dozen similar questions, with everyone posting long answers trying to talk the asker out of it. Is it possible to create a branch in such a situation? I do not want to clone the repo, just so that I can create a branch in that copy's…
John O
  • 4,863
  • 8
  • 45
  • 78
1
vote
0 answers

Git: Committing a Bare Repository

I am using Egit with Eclipse so I dont know if it is the same with the command line. I have the possibility to "commit" with a right click the Bare Repository. What does it imply to commit a bare repository? Lets say that some modifications have…
pam
  • 676
  • 1
  • 7
  • 27
1
vote
1 answer

Why does git checkout from a bare repo delete instead of creating?

This is kind of a weird one, and I apologize in advance if it doesn't have much application outside of my specific circumstances. I am using git to manage my deployment packages by committing and tagging a set of generated files relating to the…
Sophist
  • 33
  • 6
1
vote
2 answers

Git push to remote fails: Unable to create../refs/heads/master.lock: Invalid argument

I have my git bare repo initialized in remote server folder /home/bare/mygit.git I've cloned this repo: git clone user@ip.of.my.server:/home/bare/mygit.git . Then I was working with project, doing commits/pushs, etc... But today I noticed when I…
Ilia Shakitko
  • 1,417
  • 2
  • 18
  • 25
1
vote
0 answers

Difference in 'git clone --bare' between git 1.7 and 1.8: copying remotes

Suppose I've got a simple git repository with a remote named origin: $ cd test $ git init $ git remote add origin git@example.com:project.git Then if I make a bare clone of it in git 1.7.0.4, it doesn't copy any information about remotes: $ git…
Ixanezis
  • 1,631
  • 13
  • 20
1
vote
1 answer

After making a bare repository clone of an existing repository, is it possible to treat the original repository as a clone of the bare repository?

A Question: I have an existing git repository with a working directory. I want to begin sharing this repository with a team. I have done the following: git clone --bare repo_dir repo_dir.git and had the team clone the repo_dir.git. Now I want…
Raiden
  • 11
  • 1
1
vote
1 answer

git repo on production server: What is the step after setting up the bare repository?

I have created a bare git repo on my EC2 instance, and I have pushed a branch from my dev machine to it. I can run git log on the server now and it looks up-to-date with everything. The dev machine now has two remotes, one "origin" is Bitbucket.org…
Steven Lu
  • 41,389
  • 58
  • 210
  • 364