git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Matthieu Stigler <matthieu.stigler@gmail.com>
To: git@vger.kernel.org
Cc: Dmitry Potapov <dpotapov@gmail.com>, apenwarr@gmail.com
Subject: How to push properly a la subversion
Date: Thu, 30 Jul 2009 12:11:08 +0200	[thread overview]
Message-ID: <111060c20907300311g2f8423b0w656928c8ef3e3979@mail.gmail.com> (raw)

Hi

Thanks Dmitiri and Avery for your help and advices! I could understand
a little bit better, but I'm still confused. Actually what I did not
mention is that we are working on windows (actually 2000 and soon
vista :-(). The institute have a big programming project and I try to
introduce version control hopefully with git. The project is now
stored in a shared disk and there are no security/permissions issues
(every body is allowed to erase it basically:-(). Furthermore, there
are reluctant to install any new softwares and to use command line
software, I used for now portable GIT on windows, which seems to have
also ssh.

So I understood that I need to set-up a shared repo, thanks for your
advices! Now do I really need all those permissions issues? What is
the simplest way to deal with that?

I looked at http://toolmantim.com/articles/setting_up_a_new_remote_git_repository
but I'm stuck with first command:
ssh myserver.com

Does that need I should have previously set-up a ssh server? Is this a
necessary step?


In my case, the shared disk is say: T:\project\gitrepo
How should I do?

The second line in the tuto mentions:

mkdir /var/git/myapp.git && cd /var/git/myapp.git
Here /var is linux specific...
Is it any directory that is concerned or is it required to be in /var?
How do I set-it up in windows?


Finally, should I rather use something like Putty on windows?

Thank you so much for your precious help, I'm just discovering git...

Matthieu
2009/7/29 Dmitry Potapov <dpotapov@gmail.com>
On Wed, Jul 29, 2009 at 08:32:46PM +0200, Matthieu Stigler wrote:
>
> I tried just by cloning A to B, changing/commiting B and the pushing to
> A but: then on A the last log is integrated but I have this message with
> gitk "local changes checked in to index but not commited", and those
> local  changes are actually the version of A before the commit from B
> :-( What I expected with svn mentality is that A is changed and
> updated...

This is because git-push does not change your working tree. So, your
normally should never push to the branch that is currerently checked
out. (New versions of Git will warn you about that). As to having a
common/shared repo, it should be a "bare" repository.

>
> Should I enter a specifical push option? Or rather work on section
> "Setting up a shared repository"? in
> http://www.kernel.org/pub/software/scm/git/docs/gitcvs-migration.html ?
> I tried to do it entering:
>
> $ mkdir /pub/my-repo.git
> $ cd /pub/my-repo.git
> $ git --bare init --shared
> $ git --bare fetch /home/alice/myproject master:master
>
> but then I get also this message "local changes checked in to index but
> not commited" and especially there are many git files appearing that we
> would not want to see....

Strange... The above commands work perfectly for me.... And if you have
a bare repo then it should not have 'index'. So, the error does not make
much sense to me... Is it produced by gitk? Hmm, maybe some old version
of gitk did not work correctly with a bare repo... I dunno...

> And furthermore it seems there are complicated
> permissions/ssh issues that I don't need (I'm doing for now only
> locally).

I don't understand your troubles with permissions. Basically, there are
two options to setup a shared repo:
1. where every developer has each own account
2. a single account (but still each has each own ssh key)

The 'shared' option during init is necessary only for the first case to
make repository group writable. All users who can push to it should be
members of the group.

If you want to have a single system account for all users, you have two
options:
- gitosis
- ssh based authentification with forced command and then update hook
 if extra check is needed (see Documentation/howto/update-
>
> hook-example.txt)
>
>
> Dmitry

             reply	other threads:[~2009-07-30 10:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-30 10:11 Matthieu Stigler [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-07-29 18:32 How to push properly a la subversion Matthieu Stigler
2009-07-29 19:12 ` Avery Pennarun
2009-07-29 19:50 ` Dmitry Potapov
     [not found]   ` <111060c20907300111u4345b1f1x784229c066fb3f88@mail.gmail.com>
2009-07-30 11:54     ` Dmitry Potapov
2009-08-04  7:17       ` Matthieu Stigler
2009-08-04 12:04         ` Dmitry Potapov
2009-08-04 21:15         ` Nanako Shiraishi

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=111060c20907300311g2f8423b0w656928c8ef3e3979@mail.gmail.com \
    --to=matthieu.stigler@gmail.com \
    --cc=apenwarr@gmail.com \
    --cc=dpotapov@gmail.com \
    --cc=git@vger.kernel.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).