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

git add to bare repo

I greated a repository with: git init --bare on a server and I want to push a branch to it. git push origin Dev But I get remote fatal: you are a branch waiting to be born. What am I doing wrong? It seems to work if I dont use --bare, but I think…
mike628
  • 45,873
  • 18
  • 40
  • 57
0
votes
3 answers

git - working with remote branches from a bare repo

I want to do some funky stuff with a project on github (not mine). So I want to basically clone it but I don't want to have a working tree... so this is what I do: I create a bare repo locally, then I added a remote to the github repo. I fetched, I…
eftshift0
  • 26,375
  • 3
  • 36
  • 60
0
votes
1 answer

Post-receive hook causing untracked files in production folder

I checked the google for similar questions and the only thing that I found with similar problem is in this topic: Post-receive script results in untracked/modified files The situation is this. I guide from the 4.4 Git on the Server - Setting Up the…
Hristian Yordanov
  • 650
  • 1
  • 6
  • 25
0
votes
0 answers

How do I configure a remote to have a fixed receive pack?

I have a git bare repository on my server which has a post-receive hook that essentially does GIT_WORK_TREE=`/path/to/public_html` git checkout -f Whenever I do a push from my local repo to this remote I get an error: fatal: bad config value for…
Saifur Rahman Mohsin
  • 929
  • 1
  • 11
  • 37
0
votes
1 answer

How can my git repository be non-bare and have no working tree?

It seems like the central git repo I'm working with is both non-bare and has no working tree, which doesn't seem possible given my understanding of the definition of non-bare. In the repository the result of git rev-parse --is-bare-repository is…
0
votes
0 answers

Git : post-receive hook not fired after a local fetch on a remote bare repo

Here the context: Local development on my computer Source code pushed on Github Remote server deployment with a bare repo post-receive hook set on the bare repo to deploy on the Apache directory New content deployment via SSH -> git remote add…
Jibeji
  • 453
  • 4
  • 14
0
votes
1 answer

Missing remote branches in git log for bare repositories

When cloning a repositoy with --bare git log has no status about the remote branches. There might be a good reason for it but I don't get it. git fetch origin seems to be successful but the remote branches are still mising in the log. EDIT: I mean I…
ploth
  • 435
  • 8
  • 16
0
votes
1 answer

How to get changed files in my repository created with --bare

Hello I have a repository created with --bare on my git server, I would like for example in the master branch when I had change of my several codes.js I would take the modified file and execute it by a routine that I have in nodejs, but in the…
Renan Alexandre
  • 147
  • 1
  • 7
0
votes
1 answer

make USB drive work like github - a remote repository

I am working on a project locally on my machine. I want to have an up to date clone on my USB drive so I can hook it up to any other pc, clone it, and will be able to continue working on the project. I initialised my local copy as a git repo and…
bcsta
  • 1,963
  • 3
  • 22
  • 61
0
votes
1 answer

failed to lock refs/heads/master remote bare repo

My problems refers to the situation described in this post. In a nutshell, there is a remote bare and a non-bare repo. According to the plan few people (including me) should be able to push their changes to the bare repo. The hooks/post-receive file…
balkon16
  • 1,338
  • 4
  • 20
  • 40
0
votes
1 answer

Set up new bare repo (excluding few directories)

I want to create a new bare repo on the remote server that all team members can push to. Files with code already exist on the server. Let's say that there are 10 directories on the server but only 5 of them will be updated (commits will be made to).…
balkon16
  • 1,338
  • 4
  • 20
  • 40
0
votes
1 answer

Retrieve files overwritten by pushing to and pulling from bare repo

The situation is as follows: there is a bare repo (repo.git directory) on a remote Linux server. Up to some point (point A) in the past people had been using it the way prescribed by "bare and non-bare" directive: edit code on your local machine (in…
balkon16
  • 1,338
  • 4
  • 20
  • 40
0
votes
0 answers

Git - bare repo, is checkout on a different working-tree and submodules working?

On my production server I created a bare repo and a working directory. This in order to have history in a unusual place while the working directory is "public". Everything seems fine even if I'm thinking about having misunderstood "bare" and used…
Max Cuttins
  • 614
  • 2
  • 6
  • 20
0
votes
1 answer

Cannot push to aws ec2 from my local ubuntu machine

I tried to push to an aws ec2 instance using git but I always get this error : error: pack-objects died of signal 13 error: failed to push some refs to ssh://ubuntu@..../..../myrepo.git what i did: 1- create a git bare repository on my ec2 server…
haydar
  • 111
  • 1
  • 9
0
votes
2 answers

Combine 2 same files in one using merge?

I'm new to git . I can't find any answer to this simple question, have done a lot of research : We are using a GIT bare redepository on a linux server . Now let's suppose this : Dev 1 Opens index.html Dev 2 Opens index.html at the same time Dev 1…
jaja5000
  • 51
  • 8