Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

How do I check that it is bare?

As mentioned in the answer belowanswer below (upvoted) by jberrymanjberryman, if you have access to the remote repo, you can run in it:

git rev-parse --is-bare-repository 

It was introduced as early as commit 493c774, Git 1.5.3 (Sept. 2007) and commit 7ae3df8 by Matthias Lederhofer (matled).

When the repository is bare print "true", otherwise "false".


You could use (from git config):

 git config --add push.default current 

to specify what you want to push by default.

or:

 git config --global push.default matching 

if you have many repositories.

current: push the current branch to a branch of the same name.

Check also if the warning was not followed by an error message like in this SO questionSO question.


So your destination repo may be a bare one, but, as said in Sensible Git Refspecs:

When you do a git pull, fetch, push and some others you need to specify a refspec for the current repository.
A refspec describes the mapping between the local reference and the remote one, so you can push (or pull etc) the master branch head and store it as your origin branch head. Basically it’s a way of mapping branches between repos.

See also "concept of bared shared repository in gitconcept of bared shared repository in git".


Note: it is true than from Git1.6.3, :

"git push" into a branch that is currently checked out will be refused by default.
You can choose what should happen upon such a push by setting the configuration variable receive.denyCurrentBranch in the receiving repository.

But I do not think this is what you are seeing right now.


As mentioned in "all about "bare" repos -- what, why, and how to fix a non-bare push" (at the bottom)

To make it a "real" bare repo, just delete all the files except .git, then mv .git/* .; rmdir .git.
Finally, edit the file called config and change bare = false to bare = true.

So if your destination repo has a config file with bare = true, it is a bare repo.

How do I check that it is bare?

As mentioned in the answer below (upvoted) by jberryman, if you have access to the remote repo, you can run in it:

git rev-parse --is-bare-repository 

It was introduced as early as commit 493c774, Git 1.5.3 (Sept. 2007) and commit 7ae3df8 by Matthias Lederhofer (matled).

When the repository is bare print "true", otherwise "false".


You could use (from git config):

 git config --add push.default current 

to specify what you want to push by default.

or:

 git config --global push.default matching 

if you have many repositories.

current: push the current branch to a branch of the same name.

Check also if the warning was not followed by an error message like in this SO question.


So your destination repo may be a bare one, but, as said in Sensible Git Refspecs:

When you do a git pull, fetch, push and some others you need to specify a refspec for the current repository.
A refspec describes the mapping between the local reference and the remote one, so you can push (or pull etc) the master branch head and store it as your origin branch head. Basically it’s a way of mapping branches between repos.

See also "concept of bared shared repository in git".


Note: it is true than from Git1.6.3, :

"git push" into a branch that is currently checked out will be refused by default.
You can choose what should happen upon such a push by setting the configuration variable receive.denyCurrentBranch in the receiving repository.

But I do not think this is what you are seeing right now.


As mentioned in "all about "bare" repos -- what, why, and how to fix a non-bare push" (at the bottom)

To make it a "real" bare repo, just delete all the files except .git, then mv .git/* .; rmdir .git.
Finally, edit the file called config and change bare = false to bare = true.

So if your destination repo has a config file with bare = true, it is a bare repo.

How do I check that it is bare?

As mentioned in the answer below (upvoted) by jberryman, if you have access to the remote repo, you can run in it:

git rev-parse --is-bare-repository 

It was introduced as early as commit 493c774, Git 1.5.3 (Sept. 2007) and commit 7ae3df8 by Matthias Lederhofer (matled).

When the repository is bare print "true", otherwise "false".


You could use (from git config):

 git config --add push.default current 

to specify what you want to push by default.

or:

 git config --global push.default matching 

if you have many repositories.

current: push the current branch to a branch of the same name.

Check also if the warning was not followed by an error message like in this SO question.


So your destination repo may be a bare one, but, as said in Sensible Git Refspecs:

When you do a git pull, fetch, push and some others you need to specify a refspec for the current repository.
A refspec describes the mapping between the local reference and the remote one, so you can push (or pull etc) the master branch head and store it as your origin branch head. Basically it’s a way of mapping branches between repos.

See also "concept of bared shared repository in git".


Note: it is true than from Git1.6.3, :

"git push" into a branch that is currently checked out will be refused by default.
You can choose what should happen upon such a push by setting the configuration variable receive.denyCurrentBranch in the receiving repository.

But I do not think this is what you are seeing right now.


As mentioned in "all about "bare" repos -- what, why, and how to fix a non-bare push" (at the bottom)

To make it a "real" bare repo, just delete all the files except .git, then mv .git/* .; rmdir .git.
Finally, edit the file called config and change bare = false to bare = true.

So if your destination repo has a config file with bare = true, it is a bare repo.

add check
Source Link
VonC
  • 1.4m
  • 569
  • 4.8k
  • 5.7k

How do I check that it is bare?

As mentioned in the answer below (upvoted) by jberryman, if you have access to the remote repo, you can run in it:

git rev-parse --is-bare-repository 

It was introduced as early as commit 493c774, Git 1.5.3 (Sept. 2007) and commit 7ae3df8 by Matthias Lederhofer (matled).

When the repository is bare print "true", otherwise "false".


You could use (from git config):

 git config --add push.default current 

to specify what you want to push by default.

or:

 git config --global push.default matching 

if you have many repositories.

current: push the current branch to a branch of the same name.

Check also if the warning was not followed by an error message like in this SO question.


So your destination repo may be a bare one, but, as said in Sensible Git Refspecs:

When you do a git pull, fetch, push and some others you need to specify a refspec for the current repository.
A refspec describes the mapping between the local reference and the remote one, so you can push (or pull etc) the master branch head and store it as your origin branch head. Basically it’s a way of mapping branches between repos.

See also "concept of bared shared repository in git".


Note: it is true than from Git1.6.3, :

"git push" into a branch that is currently checked out will be refused by default.
You can choose what should happen upon such a push by setting the configuration variable receive.denyCurrentBranch in the receiving repository.

But I do not think this is what you are seeing right now.


As mentioned in "all about "bare" repos -- what, why, and how to fix a non-bare push" (at the bottom)

To make it a "real" bare repo, just delete all the files except .git, then mv .git/* .; rmdir .git.
Finally, edit the file called config and change bare = false to bare = true.

So if your destination repo has a config file with bare = true, it is a bare repo.

You could use (from git config):

 git config --add push.default current 

to specify what you want to push by default.

or:

 git config --global push.default matching 

if you have many repositories.

current: push the current branch to a branch of the same name.

Check also if the warning was not followed by an error message like in this SO question.


So your destination repo may be a bare one, but, as said in Sensible Git Refspecs:

When you do a git pull, fetch, push and some others you need to specify a refspec for the current repository.
A refspec describes the mapping between the local reference and the remote one, so you can push (or pull etc) the master branch head and store it as your origin branch head. Basically it’s a way of mapping branches between repos.

See also "concept of bared shared repository in git".


Note: it is true than from Git1.6.3, :

"git push" into a branch that is currently checked out will be refused by default.
You can choose what should happen upon such a push by setting the configuration variable receive.denyCurrentBranch in the receiving repository.

But I do not think this is what you are seeing right now.


As mentioned in "all about "bare" repos -- what, why, and how to fix a non-bare push" (at the bottom)

To make it a "real" bare repo, just delete all the files except .git, then mv .git/* .; rmdir .git.
Finally, edit the file called config and change bare = false to bare = true.

So if your destination repo has a config file with bare = true, it is a bare repo.

How do I check that it is bare?

As mentioned in the answer below (upvoted) by jberryman, if you have access to the remote repo, you can run in it:

git rev-parse --is-bare-repository 

It was introduced as early as commit 493c774, Git 1.5.3 (Sept. 2007) and commit 7ae3df8 by Matthias Lederhofer (matled).

When the repository is bare print "true", otherwise "false".


You could use (from git config):

 git config --add push.default current 

to specify what you want to push by default.

or:

 git config --global push.default matching 

if you have many repositories.

current: push the current branch to a branch of the same name.

Check also if the warning was not followed by an error message like in this SO question.


So your destination repo may be a bare one, but, as said in Sensible Git Refspecs:

When you do a git pull, fetch, push and some others you need to specify a refspec for the current repository.
A refspec describes the mapping between the local reference and the remote one, so you can push (or pull etc) the master branch head and store it as your origin branch head. Basically it’s a way of mapping branches between repos.

See also "concept of bared shared repository in git".


Note: it is true than from Git1.6.3, :

"git push" into a branch that is currently checked out will be refused by default.
You can choose what should happen upon such a push by setting the configuration variable receive.denyCurrentBranch in the receiving repository.

But I do not think this is what you are seeing right now.


As mentioned in "all about "bare" repos -- what, why, and how to fix a non-bare push" (at the bottom)

To make it a "real" bare repo, just delete all the files except .git, then mv .git/* .; rmdir .git.
Finally, edit the file called config and change bare = false to bare = true.

So if your destination repo has a config file with bare = true, it is a bare repo.

fix link
Source Link
VonC
  • 1.4m
  • 569
  • 4.8k
  • 5.7k

You could use (from git config):

 git config --add push.default current 

to specify what you want to push by default.

or:

 git config --global push.default matching 

if you have many repositories.

current: push the current branch to a branch of the same name.

Check also if the warning was not followed by an error message like in this SO question.


So your destination repo may be a bare one, but, as said in Sensible Git Refspecs:

When you do a git pull, fetch, push and some others you need to specify a refspec for the current repository.
A refspec describes the mapping between the local reference and the remote one, so you can push (or pull etc) the master branch head and store it as your origin branch head. Basically it’s a way of mapping branches between repos.

See also "concept of bared shared repository in git".


Note: it is true than from Git1.6.3, :

"git push" into a branch that is currently checked out will be refused by default.
You can choose what should happen upon such a push by setting the configuration variable receive.denyCurrentBranch in the receiving repository.

But I do not think this is what you are seingseeing right now.


As mentioned in ddd"all about "bare" repos -- what, why, and how to fix a non-bare push" (at the bottom)

To make it a "real" bare repo, just delete all the files except .git, then mv .git/* .; rmdir .git.
Finally, edit the file called config and change bare = false to bare = true.

So if your destination repo has a config file with bare = true, it is a bare repo.

You could use (from git config):

 git config --add push.default current 

to specify what you want to push by default.

or:

 git config --global push.default matching 

if you have many repositories.

current: push the current branch to a branch of the same name.

Check also if the warning was not followed by an error message like in this SO question.


So your destination repo may be a bare one, but, as said in Sensible Git Refspecs:

When you do a git pull, fetch, push and some others you need to specify a refspec for the current repository.
A refspec describes the mapping between the local reference and the remote one, so you can push (or pull etc) the master branch head and store it as your origin branch head. Basically it’s a way of mapping branches between repos.


Note: it is true than from Git1.6.3, :

"git push" into a branch that is currently checked out will be refused by default.
You can choose what should happen upon such a push by setting the configuration variable receive.denyCurrentBranch in the receiving repository.

But I do not think this is what you are seing right now.


As mentioned in ddd (at the bottom)

To make it a "real" bare repo, just delete all the files except .git, then mv .git/* .; rmdir .git.
Finally, edit the file called config and change bare = false to bare = true.

So if your destination repo has a config file with bare = true, it is a bare repo.

You could use (from git config):

 git config --add push.default current 

to specify what you want to push by default.

or:

 git config --global push.default matching 

if you have many repositories.

current: push the current branch to a branch of the same name.

Check also if the warning was not followed by an error message like in this SO question.


So your destination repo may be a bare one, but, as said in Sensible Git Refspecs:

When you do a git pull, fetch, push and some others you need to specify a refspec for the current repository.
A refspec describes the mapping between the local reference and the remote one, so you can push (or pull etc) the master branch head and store it as your origin branch head. Basically it’s a way of mapping branches between repos.

See also "concept of bared shared repository in git".


Note: it is true than from Git1.6.3, :

"git push" into a branch that is currently checked out will be refused by default.
You can choose what should happen upon such a push by setting the configuration variable receive.denyCurrentBranch in the receiving repository.

But I do not think this is what you are seeing right now.


As mentioned in "all about "bare" repos -- what, why, and how to fix a non-bare push" (at the bottom)

To make it a "real" bare repo, just delete all the files except .git, then mv .git/* .; rmdir .git.
Finally, edit the file called config and change bare = false to bare = true.

So if your destination repo has a config file with bare = true, it is a bare repo.

http://www.kernel.org/pub/software/scm/git/docs/git-config.html was remapped to http://git-scm.com/docs/git-config by Sam Saffron (17174)
Source Link
Loading
add description; added 431 characters in body
Source Link
VonC
  • 1.4m
  • 569
  • 4.8k
  • 5.7k
Loading
added 201 characters in body
Source Link
VonC
  • 1.4m
  • 569
  • 4.8k
  • 5.7k
Loading
Source Link
VonC
  • 1.4m
  • 569
  • 4.8k
  • 5.7k
Loading