How to push properly a la subversion
- From
- Matthieu Stigler <matthieu.stigler@gmail.com>
- Date
- Jul 29, 2009, 18:32 UTC
- Message-ID
- <4A7095CE.8030307@gmail.com>
Hi
I'm discovering git switchig from svn, so I'm still confused... I want actually to use git but keeping this idea of one common/public repo that different users push/pull from.
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...
So 2 questions: -how to remedy? -hot to avoid?
I could remedy on A by git reset --hard, but ideally I would not need to remedy to that...
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.... And furthermore it seems there are complicated permissions/ssh issues that I don't need (I'm doing for now only locally).
So can those new files be avoided? What is the best way to set-up git to have kind of central repo?
Thanks for your precious help!!
Matthieu Stigler