From: Jakub Narebski <jnareb@gmail.com>
To: Maaartin <grajcar1@seznam.cz>
Cc: git@vger.kernel.org
Subject: Re: Best single user practice
Date: Sat, 09 Oct 2010 15:49:25 -0700 (PDT) [thread overview]
Message-ID: <m31v7zf0e0.fsf@localhost.localdomain> (raw)
In-Reply-To: <loom.20101009T233356-82@post.gmane.org>
Maaartin <grajcar1@seznam.cz> writes:
> I've started using git maybe one month ago, and I'd like to use it for many
> things including some one-man projects, browser settings backups, and such
> things. So I always do a local git init, ssh to my server and create a repo
> there. I copy the .git/config from a working project, and change the remote
> URL. It all works, but it's not perfect.
>
> - Is it not possible to create a remote repository from my own computer without
> ssh?
No, it isn't. "git push --create" / remote "git init" is one of
requested features for quite some time, but it isn't yet implemented.
IIRC the problem is that without being able to log in to remote
machine there are situations when yoy can't resolve problems without
it.
You can always use "ssh <user>@<machine> git init <directory>" (though
it is not a solution in your case, at least not as given, because "git
init <directory>" is quite new invention).
> - There's only version 1.5.4.3 on the server and I don't want to update it
> unless strongly recommended so. Should I?
Well, with 1.5.4.3 you can't use "smart" HTTP protocol, but git is
deliberately interoperable between different versions of client and
server software.
> - Because of the low version, I can't use "git init --bare" on the server. So I
> create an usual depository and change the configuration to bare=true. Is it OK
> (I really don't mind the repo being placed in DIR/.git instead of DIR itself.)?
This should be O.K. And you can always rename DIR/.git ro DIR.git...
>
> - The very first time I need to do "git push origin master", later "git push"
> suffices. I wonder why.
It is because default git behavior is to push matching branches,
i.e. all branches having the same name in both ends (you can change it
using `push.default` config option, see git-config and git-push
manpages).
This is the default behavior, because it allows you to easily control
which branches you want to have visible in remote repository.
[...]
> - Sometimes, I use "git push --force", how do I clean up the resulting garbage
> on the server?
"git gc" on server.
>
> - How can I ensure that everything important gets pushed to the server? Maybe
> by using "git push --mirror"? Obviously and logically, .git/config doesn't get
> pushed, but maybe I miss something more important, too?
You can always change `push.default`, or you can provide push refspecs
which pushes all branches, like remote.origin.push =
+refs/heads/*:refs/heads/*
Note that the opissite side of the coin is ensuing that nothing that
doesn't have to be pushed didn't get to be pushed.
HTH (Hope That Helps)
--
Jakub Narebski
Poland
ShadeHawk on #git
prev parent reply other threads:[~2010-10-09 22:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-09 22:24 Best single user practice Maaartin
2010-10-09 22:44 ` Kevin Ballard
2010-10-10 15:33 ` Andreas Schwab
2010-10-09 22:49 ` Jakub Narebski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m31v7zf0e0.fsf@localhost.localdomain \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=grajcar1@seznam.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).