Nat! bio photo

Nat!

Senior Mull

Twitter Github Twitch

Mercurial : Initial push of a local repository to a server

In the mercurial documentation, it's seems to always be like this:

  1. you clone something off the server
  2. you do some changes
  3. you push the changes back

But what, if you started locally, and then want to push to the server ?

$ basename `pwd`
test
$ hg init
$ touch x.c
$ hg add
Füge x.c hinzu
$ hg commit -m "just a test" 
$ hg init ssh://<user>@<host>:<port>/<repository-path>/test
$ hg push ssh://<user>@<host>:<port>/<repository-path>/test
Übertrage nach ssh://<user>@<host>:<port>/<repository-path>/test
Suche nach Änderungen
Entfernt: adding changesets
Entfernt: adding manifests
Entfernt: adding file changes
Entfernt: added 1 changesets with 1 changes to 1 files