Questions tagged [git-bare]

1

votes
2

answer
89

Views

Git: Push a local git submodule, including submodule files, to a remote bare repository

I have two local projects which I manage with git, one being dependent on the other – like this: project A/ ├── project B/ │   ├── file B₁ │   ├── file B₂ │ ├── … It makes sense to me to have project B as a git submodule of project A. Now, I have set...
k.stm
1

votes
0

answer
63

Views

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 folder - logs folder - objects folder - refs folder - conf...
JonnySprouse
1

votes
1

answer
67

Views

git filter-branch - remove one of many submodules

I have been using git filter-branch a lot to get rid of legacy files, however for a bare git repo I cannot figure out how I can rewrite my git history where one of my git submodules is removed. I have a top-level repo 'Donald' and below 'Donald' I have four submodules 'Huey', 'Dewey', 'Louie' and 'P...
Peter Toft
1

votes
0

answer
32

Views

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 contains the hash of all commits made locally. The s...
balkon16
1

votes
1

answer
1.7k

Views

Is there a way to add submodules to a bare git repository?

I have some repos on my server with gitosis. One of them is Main, it's including all the others. I work with them from my local machine, and submodules hierarchy was built on my local machine. Gitosis has repos as bare(?) so, it's impossible to include submodules on the server. Problem is, Main repo...
tijagi
1

votes
1

answer
403

Views

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 repo where the code lives, and the second 'ec2' is...
Steven Lu
1

votes
2

answer
4.1k

Views

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 [email protected]:/home/bare/mygit.git . Then I was working with project, doing commits/pushs, etc... But today I noticed when I was doing a push this error: [email protected]:/var/www/mygit...
Ilia Shakitko
1

votes
1

answer
100

Views

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 oldrev newrev ref do branch=`echo $ref | cut -d/ -f3` if...
sadmicrowave
1

votes
2

answer
609

Views

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 is git over http that indeed is only a git repo serv...
Sebi2020
1

votes
1

answer
1.1k

Views

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 that? I am able to clone only bare repositories over htt...
Mudassir Razvi
1

votes
1

answer
562

Views

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 changes on their local repo, committed them, and then pushed t...
ralbatross
1

votes
1

answer
653

Views

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 failed: index-pack abnormal exit To /run/user/1000/gvfs/smb-share:server=,sh...
fham_526
1

votes
1

answer
69

Views

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 and pull form the origin, is that possible? EDIT What...
chuck1
1

votes
1

answer
0

Views

Soft reset git bare branches

I have a set of GIT repositories that I always have different activities on differrent branches and they are all pushed to github the activities are linked to Redmine and would trigger Redmine to pick up the commits once a push happens. Since the Redmine is not setup to be on the cloud and therefore...
Pok
1

votes
1

answer
181

Views

Git - Bare Repository is not up to date

ok I try again to describe my problem. At first let me say I am a beginner in Git. I have read a lot of stuff but there some points that are not clear for me. I work local on a workingcopy. My head on local branchx have the same id as remote branchx on gitlab. But on the gitlabserver I can see two b...
ninchen
1

votes
1

answer
48

Views

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
1

votes
1

answer
93

Views

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 repositories in git servers are bare. so how do websites...
Ahmed T. Ali
1

votes
2

answer
58

Views

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 repo1 (it's best to assume it's read only). In the new...
Sfisioza
0

votes
0

answer
5

Views

Jenkins Build Failed with GitBare Configuration

I'm trying to push my code using Jenkins & Git Bare configuration. While building it's not getting success. Here is the below error Warning: Permanently added 'x.x.x.x' (ECDSA) to the list of known hosts. error: unable to push to unqualified destination: devel The destination refspec neither matches...
krishna chandra
1

votes
1

answer
363

Views

Do I need to merge a branch in a bare repo?

In my setup I have three repos: A bare repo on remote server (/op/git/proj.git) A non-bare repo on remote server (/var/www/proj/.git) A non-bare repo on local machine (/var/www/proj/.git) The bare repo is origin to both ordinary repos on local and remote. Whenever I do a commit on local, I do...
Majid Fouladpour
1

votes
1

answer
36

Views

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 current version and the newer version separate, I have...
Adarsh Chauhan
1

votes
1

answer
663

Views

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). I did some branch filtering within this branch to ru...
Kashif Nazar
1

votes
2

answer
90

Views

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 access to just a small subset of files of this reposi...
matheburg
18

votes
5

answer
14.5k

Views

How can I use git-archive to include submodules from a bare repository

I'm in the process of setting up a deployment script. The basic process is: Push changes to a bare repository on the server Then based on new tags will create a new folder for the release. Use git archive to move the files into the release directory Runs some migrations scripts and puts it live (if...
Jacob
19

votes
5

answer
17.4k

Views

can't clone git repos via http; info/refs not found

I am trying to make a git repository available for read-only access over http. I am doing it the old-style way because git-http-backend is not available on my host system. That is, I am simply putting the bare repository in a http accessible location. I created the bare repository successfully on...
epl
5

votes
2

answer
7.9k

Views

Bare repository permissions.

I setup git on an ubuntu server and I was pushing the local repo to the server and getting the errors below. When I change the permissions of the two folders it works. I just want to understand why when I setup git init --bare it doesn't just work with the permissions it creates. Also is 777 the bes...
ThomasReggi
4

votes
1

answer
69

Views

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 changes should be pushed only from the first reposit...
lifeisfoo
21

votes
6

answer
23.7k

Views

Getting a working copy of a bare repository

I have a server on which I have a bare repository for pushing. However, my server needs to have a working copy of the master branch. How do I get a working copy and that only from a bare repository?
Jonathan Allard
22

votes
3

answer
7.5k

Views

Git submodule on remote bare

I've setup my environment so I can push to a remote bare repository, I used these commands to setup the remote repository: $ mkdir ~/website.git && cd ~/website.git $ git init --bare And $ cat > hooks/post-receive #!/bin/sh GIT_WORK_TREE=/var/www/website git checkout -f $ chmod +x hooks/post-receive...
Thiago Belem
3

votes
1

answer
547

Views

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 is it possible with a local git command to create...
fabb
3

votes
1

answer
1.9k

Views

Git: How to check which files exist (and their content) in a shared (bare) repository?

I created a shared repo by: git init --bare my_project.git At some point, another user updated this repo with his changes (using git push). How could I check which files are exist now in the shared repo and what is their content ? In a local repo, I could do just ls and cat , but in the shared repo...
Misha Moroshko
12

votes
1

answer
3.4k

Views

What is a bare repository and why would I need one?

This maybe has been answered, but I didn't find a good answer. I come from centralized repositories, such as SVN, where usually you only perform checkouts, updates, commits, reverts, merges and not much more. Git is driving me crazy. There are tons of commands, but the most difficult to understand...
Albert
3

votes
1

answer
698

Views

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 trying to set up git. I really would like to keep the s...
Derrick Miller
2

votes
1

answer
1.7k

Views

Revert server to past commit with bare repository hooks

I have a server with a bare git repository that I push to for live deployment. It has a simple post-receive hook that updates my server code with the latest on master. I sometimes need to revert to a specific past commit when bugs are found on the production server (I test myself locally, but I don'...
treydavis
3

votes
2

answer
814

Views

Verify a bare Git repository has data

How does one verify that files were pushed to a bare repository correctly? Since bare repositories have no working tree, you obviously can't do a simple git log because it isn't picked up as a git repo. I realize there are solutions like suggested here, but I'd like to know how to do it using the co...
Qix
6

votes
1

answer
3.3k

Views

Getting 'receive.denyCurrentBranch' error when pushing to bare Git repo

Have a remote git bare repo that onto which I've pushed a branch from one machine, and pulled to another machine. Made some changes on the other machine, trying to push those changes back to the remote bare repo, and I get the 'receive.denyCurrentBranch' error. What's going on? This isn't supposed t...
rickb
3

votes
1

answer
707

Views

Does git allow for “bare” submodules?

This may be terrible, I am not sure. Let us say we have a repo 'product' with a working directory /product /product/command.script /product/config/ (bare git repo) And a repo 'config' with a working directory /config /config/config.json The command.script file has actions to interact with a bare rep...
Tyler Clendenin
29

votes
1

answer
8.5k

Views

git ls-files in bare repository

I want to access a bare git repository, and I want to list all files in the repository. On a normal git repository I can easily do that by running git ls-files. Example output: $ git ls-files README.md file1.js file2.js file3.js folder1/file4.js folder2/file5.js In a bare git repository this fails...
Jesper Rønn-Jensen
2

votes
1

answer
549

Views

git push *to* a shallow clone, why not?

So everybody seems to be asking why one cannot push from a shallow clone (while I actually already achieved this). However what I'm interested in is pushing to a shallow server. This doesn't work (I've served the git repo via 'git clone --bare --depth 1 the_original_repo' in my server, and I cannot...
knocte
2

votes
2

answer
1.3k

Views

How can I get the GIT_PS1_SHOWDIRTYSTATE to not run against a bare repo?

So I've set up bash autocompletion for my install of git, and that rocks. However, I've got a bare repo that I occasionally have to directly interface with (git reset, for example), and any time I cd into the bare repo, the GIT_PS1_SHOWDIRTYSTATE setting I have to show me the status of my normal wor...
jeffbyrnes

View additional questions