Skip to content

Commit

Permalink
clone: do not create remotes/origin nor origin branch in a bare repos…
Browse files Browse the repository at this point in the history
…itory.

It is simply pointless, since no merges will ever happen in such
a repository.

Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Junio C Hamano committed Jan 25, 2006
1 parent 87e80c4 commit 4fb66a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Documentation/git-clone.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ OPTIONS
Make a 'bare' GIT repository. That is, instead of
creating `<directory>` and placing the administrative
files in `<directory>/.git`, make the `<directory>`
itself the `$GIT_DIR`. This implies `-n` option.
itself the `$GIT_DIR`. This implies `-n` option. When
this option is used, neither the `origin` branch nor the
default `remotes/origin` file is created.

-o <name>::
Instead of using the branch name 'origin' to keep track
Expand Down
2 changes: 1 addition & 1 deletion git-clone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ esac

cd "$D" || exit

if test -f "$GIT_DIR/HEAD"
if test -f "$GIT_DIR/HEAD" && test -z "$bare"
then
head_points_at=`git-symbolic-ref HEAD`
case "$head_points_at" in
Expand Down

0 comments on commit 4fb66a6

Please sign in to comment.