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
3 answers

How to restore a locally lost git bare repo (using separate-git-dir) with one of its remotes

A long time ago, I set up a repo using git --separate-git-dir because I did want the repo inside the working directory. Unfortunately, that separate (presumably "bare"?) repo has been lost to hard drive failure, and I want to rebuild it using the…
jaydisc
  • 369
  • 2
  • 11
1
vote
1 answer

Pushing to a shared network drive?

I want to develop first on my local machine, and then push it to the shared drive /R. I think I might not be using terminology correctly, so feel free to correct me if I'm wrong. Basically, if I have a directory tree and files set up such as…
Christina Zhou
  • 1,483
  • 1
  • 7
  • 17
1
vote
1 answer

How do I set the source directory's storage directory when I create git init --bare?

I used git init --bare to create a bare repository on linux, but I want to set its source directory location at the same time, so that although the bare repository only saves git commit records, I can do it directly on linux. Find the source code.
user11409857
1
vote
0 answers

No changes in the remote bare repo after git push

There is a remote bare repo on a Linux server (repozytorium.git in the following example) and a local non-bare repo. The problem is that after git push dev master no changes take place at the server, even though repozytorium.git/refs/heads/master…
balkon16
  • 1,338
  • 4
  • 20
  • 40
1
vote
1 answer

push from bare git repository

I am trying to use a bare git repo as a bridge between my working repo and the origin origin ----- bare repo ----- working repo I can go into the working repo and push and pull from the bare repo. But I also need to go into the bare repo and push…
chuck1
  • 665
  • 7
  • 22
1
vote
0 answers

Fix git repo that mimics bare repository structure but is not

After converting my SVN repository to a Git repository, I was left with a folder with all the contents that would normally be in a .git folder in the top level directory e.g. Repo (top level directory) - branches folder - hooks folder - info…
Idris.AH
  • 410
  • 1
  • 10
  • 22
1
vote
2 answers

Git pull from remote bare repository

When I try to pull from a bare remote repository, git returns Already up-to-date. As far as I understand, if the local repository has some changes, and I commit them thus advancing the HEAD, shouldn't pull fetch the different files from the bare…
anon123
  • 43
  • 5
1
vote
1 answer

Bare git repo post-receive hook no longer able to checkout

I have the common setup of a bare git repo on a web server using a post-receive hook to automatically checkout changes to a web site. This has been working great. However, a coworker recently cloned the bare repo (git clone ), made some…
ralbatross
  • 2,448
  • 4
  • 25
  • 45
1
vote
0 answers

How to push to the bare repository for the first time (in Git)?

I have created a bare repository for Git using the following command (on my server): mkdir socialclub.git cd socialclub.git git --bare init Then on my local machine, I used the git init in a non-empty directory using the following command: git…
sheidaei
  • 9,842
  • 20
  • 63
  • 86
1
vote
1 answer

git: cherry-pick in bare repo

My server-side bare git repo needs to periodically cherry-pick commits from a special branch onto master (executed from a hook). Is there any way to avoid a checkout and do this directly in the bare repo? Edit: Since the cherry-picking procedure is…
Irfy
  • 9,323
  • 1
  • 45
  • 67
1
vote
1 answer

Failed push with bare Git repo

I have a remote bare repo master and a local branch cloud which I have set to track it with git branch cloud -u amazon/master but git push results in fatal: The upstream branch of your current branch does not match the name of your current…
orome
  • 45,163
  • 57
  • 202
  • 418
1
vote
2 answers

Push all git commits as one to empty bare repo

I have two bare repositories. repo1 - with all the history repo2 - new, empty one I want to push all the files from repo1 to repo2, but without the whole history, just the the state from the last commit. I don't want to touch the history of the…
Sfisioza
  • 3,830
  • 6
  • 42
  • 57
1
vote
2 answers

How to provide working files parallel to a bare git repository

Background At our network share we have some bare git repositories that are used for file exchange (and version control, etc.) during development. Unfortunately, it happens quite often that people that are not involved in the development request…
matheburg
  • 2,097
  • 1
  • 19
  • 46
1
vote
1 answer

How to enable online editing of repository source in git server?

We have a private git server that contains our repositories. it works fine, but we want to add online source code view , editing .. etc ( like GitHub.com does), how can we provide these features in our server ? As far as I know, generally the…
Ahmed T. Ali
  • 1,021
  • 1
  • 13
  • 22
1
vote
1 answer

GIT INIT not creating a working tree

I'm doing a simple git init C:\XXX running from my master machine to be executed on another slave machine. C:\XXX is a path in the slave. The assumption is that it would create a non bare repository as I did not provide a --bare option. Also I…
ARUN NAIR
  • 11
  • 1