{"thread":{"id":"20295","subject":"How to push properly a la subversion","startedAt":"2009-07-30T10:11:08Z","lastAt":"2009-07-30T10:11:08Z","messageCount":1,"participants":["Matthieu Stigler"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"119166","messageId":"111060c20907300311g2f8423b0w656928c8ef3e3979@mail.gmail.com","threadId":"20295","inReplyTo":null,"subject":"How to push properly a la subversion","fromName":"Matthieu Stigler","fromEmail":"matthieu.stigler@gmail.com","sentAt":"2009-07-30T10:11:08Z","receivedAt":"2009-07-30T10:11:08Z","isPatch":false,"sender":{"key":"matthieu.stigler@gmail.com","avatar":null},"body":"Hi\n\nThanks Dmitiri and Avery for your help and advices! I could understand\na little bit better, but I'm still confused. Actually what I did not\nmention is that we are working on windows (actually 2000 and soon\nvista :-(). The institute have a big programming project and I try to\nintroduce version control hopefully with git. The project is now\nstored in a shared disk and there are no security/permissions issues\n(every body is allowed to erase it basically:-(). Furthermore, there\nare reluctant to install any new softwares and to use command line\nsoftware, I used for now portable GIT on windows, which seems to have\nalso ssh.\n\nSo I understood that I need to set-up a shared repo, thanks for your\nadvices! Now do I really need all those permissions issues? What is\nthe simplest way to deal with that?\n\nI looked at http://toolmantim.com/articles/setting_up_a_new_remote_git_repository\nbut I'm stuck with first command:\nssh myserver.com\n\nDoes that need I should have previously set-up a ssh server? Is this a\nnecessary step?\n\n\nIn my case, the shared disk is say: T:\\project\\gitrepo\nHow should I do?\n\nThe second line in the tuto mentions:\n\nmkdir /var/git/myapp.git && cd /var/git/myapp.git\nHere /var is linux specific...\nIs it any directory that is concerned or is it required to be in /var?\nHow do I set-it up in windows?\n\n\nFinally, should I rather use something like Putty on windows?\n\nThank you so much for your precious help, I'm just discovering git...\n\nMatthieu\n2009/7/29 Dmitry Potapov <dpotapov@gmail.com>\nOn Wed, Jul 29, 2009 at 08:32:46PM +0200, Matthieu Stigler wrote:\n>\n> I tried just by cloning A to B, changing/commiting B and the pushing to\n> A but: then on A the last log is integrated but I have this message with\n> gitk \"local changes checked in to index but not commited\", and those\n> local  changes are actually the version of A before the commit from B\n> :-( What I expected with svn mentality is that A is changed and\n> updated...\n\nThis is because git-push does not change your working tree. So, your\nnormally should never push to the branch that is currerently checked\nout. (New versions of Git will warn you about that). As to having a\ncommon/shared repo, it should be a \"bare\" repository.\n\n>\n> Should I enter a specifical push option? Or rather work on section\n> \"Setting up a shared repository\"? in\n> http://www.kernel.org/pub/software/scm/git/docs/gitcvs-migration.html ?\n> I tried to do it entering:\n>\n> $ mkdir /pub/my-repo.git\n> $ cd /pub/my-repo.git\n> $ git --bare init --shared\n> $ git --bare fetch /home/alice/myproject master:master\n>\n> but then I get also this message \"local changes checked in to index but\n> not commited\" and especially there are many git files appearing that we\n> would not want to see....\n\nStrange... The above commands work perfectly for me.... And if you have\na bare repo then it should not have 'index'. So, the error does not make\nmuch sense to me... Is it produced by gitk? Hmm, maybe some old version\nof gitk did not work correctly with a bare repo... I dunno...\n\n> And furthermore it seems there are complicated\n> permissions/ssh issues that I don't need (I'm doing for now only\n> locally).\n\nI don't understand your troubles with permissions. Basically, there are\ntwo options to setup a shared repo:\n1. where every developer has each own account\n2. a single account (but still each has each own ssh key)\n\nThe 'shared' option during init is necessary only for the first case to\nmake repository group writable. All users who can push to it should be\nmembers of the group.\n\nIf you want to have a single system account for all users, you have two\noptions:\n- gitosis\n- ssh based authentification with forced command and then update hook\n if extra check is needed (see Documentation/howto/update-\n>\n> hook-example.txt)\n>\n>\n> Dmitry\n"}]}