Questions tagged [git-non-bare-repository]

A non-bare Git repository, unlike a bare repo, has a working copy (also known as a working (directory) tree, or a working directory).

A non-bare Git repository, unlike a bare repo, has a working copy (also known as a working (directory) tree, or a working directory).

See also .

14 questions
1778
votes
12 answers

How do I properly force a Git push?

I've set up a remote non-bare "main" repo and cloned it to my computer. I made some local changes, updated my local repository, and pushed the changes back to my remote repo. Things were fine up to that point. Now, I had to change something in the…
Spyros
  • 46,820
  • 25
  • 86
  • 129
680
votes
18 answers

How to convert a normal Git repository to a bare one?

How can I convert a 'normal' Git repository to a bare one? The main difference seems to be: in the normal Git repository, you have a .git folder inside the repository containing all relevant data and all other files making up your working copy in a…
Boldewyn
  • 81,211
  • 44
  • 156
  • 212
170
votes
5 answers

How to push to a non-bare Git repository?

I usually work on a remote server via ssh (screen and vim), where I have a Git repository. Sometimes I'm not online, so I have a separate repository (cloned from my remote) on my laptop. However, I can't pull from this repository on remote side…
woky
  • 4,686
  • 9
  • 36
  • 44
96
votes
16 answers

Why is it not a commit and a branch cannot be created from it?

I need to work with an intricate configuration of repositories. I have 5 of them: A remote central repository on machine 1. My local repository on my notebook (machine 2). A bare repository on machine 3. A repository on machine 3. A repository on…
Roman
  • 124,451
  • 167
  • 349
  • 456
56
votes
6 answers

What are the consequences of using receive.denyCurrentBranch in Git?

I have a Git repository. I have cloned the repository and can commit my local changes. When I push my changes to the server it works. As soon as I create a branch, I checkout the branch, commit my work and then checkout the master branch. I then…
user1646481
  • 1,267
  • 6
  • 21
  • 29
29
votes
3 answers

When creating a git repository that will be on the server, can I convert it to a bare repository?

I already created a repository. Can I make it a bare type or shall I start over?
mrblah
  • 99,669
  • 140
  • 310
  • 420
4
votes
2 answers

Why can't I push to a checked out branch of a non-bare repository?

I am confused regarding a scenario that I created. I created a repository on Github (Lets call it A) and pushed code to it. After that I cloned that repository to my local (Lets call it B) such that origin of my local was remote repo A. Now I cloned…
harsrawa
  • 422
  • 5
  • 18
3
votes
2 answers

git - Still cannot push to non-bare repo after setting receive.denycurrentbranch=ignore

My setup is as follows: I am running git version 2.3.2 (Apple Git-55) on my mac. This has a non-bare git repository sitting at ~/xyz. Then I am running Windows 7 64bit using VMWare Fusion on the same mac. The VM has git 1.9.5, which is the latest…
Jason L
  • 510
  • 5
  • 16
3
votes
1 answer

Why is `git push` to non-bare remote not the dual of `git fetch` from the remote

First, I understand the how related to pushing to non-bare git remotes, including the use of the git config option receive.denyCurrentBranch and other work arounds, so I'm NOT looking for answers such as those here: Git push error '[remote…
crimson-egret
  • 753
  • 7
  • 18
3
votes
1 answer

Why does my remote Git repository have uncommitted changes after pushing to it?

I set up a new Git repository using the following commands: mkdir plans-for-world-domination cd plans-for-world-domination git init echo "MWA HA HA HA HA!" > plans.txt git add . git commit -m "Beginning my plans..." Then I made a clone of this…
user456814
1
vote
2 answers

Git clone prevent from cloning working copy (non bare) repository

If you do a clone of a git working copy (repository with a working tree) change some files, commit and try to push you'll get a message: remote: error: refusing to update checked out branch: refs/heads/master ... ! [remote rejected] master -> master…
Jimmix
  • 5,644
  • 6
  • 44
  • 71
0
votes
0 answers

msvcr120.dll required for C# build

how do I make push update working copy pushed file modifications made in Visual Studio to DevOps. The changes do not show in DevOps. I understand the push went to a non-bare repo. What Do I need to do to get all my pushes to go to the working copy?
nathan
  • 29
  • 1
0
votes
1 answer

Git Push Failure : unable to migrate objects to permanent storage

I have a local repository which I have cloned to another directory on the same machine. When I do some changes on the clone and commit and then push I get the following error message I emphasize again that both the cloned repository from which i do…
Rafael Zanzoori
  • 531
  • 1
  • 7
  • 23
0
votes
0 answers

Converting bare git repository into a copy where I can see the files

I need to convert a local bare git repository to another form where I can see the actual files. My repository is roughly 13.5GB in size. Essentially, the repository is in a state in which it would be if it were hosted on a remote server. I have a…
Idris.AH
  • 410
  • 1
  • 10
  • 22