* help on importing
@ 2011-06-19 15:03 Mihamina Rakotomandimby
2011-06-19 15:23 ` Jakub Narebski
0 siblings, 1 reply; 2+ messages in thread
From: Mihamina Rakotomandimby @ 2011-06-19 15:03 UTC (permalink / raw)
To: git
Hi all,
I made several commits to a small local program.
When I list them with "git log" I see them.
To publish my work, I choosed to sign in a forge (like github, google
code,...). I choosed forge.ocamlcore.org
With my account creation, the forge automatically created an empty GIT
repository.
I clone it with:
git clone git+ssh://rakotomandimby@forge.ocamlcore.org/gitroot/ocaml-crypt/ocaml-crypt.git
Initialized empty Git repository in /tmp/ocaml-crypt/ocaml-crypt/.git/
warning: You appear to have cloned an empty repository.
I am surprised the initialisation is not in /tmp/ocaml-crypt/ocaml-crypt.git/.git/
as I pulled "ocaml-crypt.git".
Anyway...
When add+commit a file into "/tmp/ocaml-crypt/ocaml-crypt/",
I get no errors, but when pushing:
$ git push
No refs in common and none specified; doing nothing.
Perhaps you should specify a branch such as 'master'.
fatal: The remote end hung up unexpectedly
I dont understand...
If I have success on this first simple steps,
I could switch to the next level: Importing my local commits
to that cloned repository ans then push that all.
I read several GIT documentation, but it seems I dont have the
right keywords to have good results...
Would you help?
--
RMA.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: help on importing
2011-06-19 15:03 help on importing Mihamina Rakotomandimby
@ 2011-06-19 15:23 ` Jakub Narebski
0 siblings, 0 replies; 2+ messages in thread
From: Jakub Narebski @ 2011-06-19 15:23 UTC (permalink / raw)
To: Mihamina Rakotomandimby; +Cc: git
Mihamina Rakotomandimby <mihamina@bbs.mg> writes:
> I made several commits to a small local program.
> When I list them with "git log" I see them.
>
> To publish my work, I choosed to sign in a forge (like github, google
> code,...). I choosed forge.ocamlcore.org
Note that you don't have to choose _one_ place. With distributed
version control systems you can interact with many remote repositories
(though only one would be called "origin" and would be the default
repository).
I for example push both to repo.or.cz and to GitHub.
> With my account creation, the forge automatically created an empty GIT
> repository.
>
> I clone it with:
>
> $ git clone git+ssh://rakotomandimby@forge.ocamlcore.org/gitroot/ocaml-crypt/ocaml-crypt.git
> Initialized empty Git repository in /tmp/ocaml-crypt/ocaml-crypt/.git/
> warning: You appear to have cloned an empty repository.
>
> I am surprised the initialisation is not in /tmp/ocaml-crypt/ocaml-crypt.git/.git/
> as I pulled "ocaml-crypt.git".
It is Git convention to use 'project/.git' for a working repository,
which working area (checked out files) in 'project/', while using
'project.git' for name of _bare_ repository, i.e. without working
directory.
project/.git == project.git
project/ [no workdir]
> Anyway...
> When add+commit a file into "/tmp/ocaml-crypt/ocaml-crypt/",
> I get no errors, but when pushing:
>
> $ git push
> No refs in common and none specified; doing nothing.
> Perhaps you should specify a branch such as 'master'.
> fatal: The remote end hung up unexpectedly
>
> I don't understand...
The default Git behavior is to push *only* matching branches. With
this workflow you must push a branch explicitly first time. What you
need to do is to use
$ git push --all
to push all branches, or "git push origin HEAD" to push only current
branch.
This behavior is configurable, either via `push.default` config
variable, or via `remote.origin.push`.
HTH
--
Jakub Narebski
Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-06-19 15:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-19 15:03 help on importing Mihamina Rakotomandimby
2011-06-19 15:23 ` Jakub Narebski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).