All of lore.kernel.org
 help / color / mirror / Atom feed
* Coming from SVN world - need help
@ 2011-07-13 13:00 J. Bakshi
  2011-07-13 13:17 ` Erik Faye-Lund
  0 siblings, 1 reply; 4+ messages in thread
From: J. Bakshi @ 2011-07-13 13:00 UTC (permalink / raw)
  To: git

Dear list,

Greetings !!

I have come from SVN world and totally new to GIT. I have managed to set gitweb and git; based on https:// along with authentication ( both for read and right ). And now I like to do the rest of the svn related thing in GIT. Just see the script below. This script first create an empty repo, built the structure; then checkout in a directory to map trunk with it and add contents to the repo.

```````````````````
svnadmin create ${svn_path}/<repo>

svn mkdir file:///${svn_path}/<repo>/trunk  \
         file:///${svn_path}/<repo>/tags  \
         file:///${svn_path}/<repo>/branches \
         -m "creating repo structure"

# map a directory with trunk 

cd mydir
mydir $> svn --username ${admin_svn} --password ${admin_svn_pass} co  file:///${svn_path}/${name_site}/trunk ./

#add and commit
mydir $> svn  add dir1 dir2

##commit
mydir $> svn  commit -m "adding dir1  dir2"
mydir $> svn up
````````````````````````````````

And now the issues when I am trying to do the same with git

[1] git init ${git_path}/<repo>.git  >>> ok , it is working

[2] Problem with mapping a dir with this repo

mydir $> git --username <username> --password <password> clone file:///${git_path}/<repo>.git 

Not working --username and --password .

Also git clone file:///${git_path}/<repo>.git creates a folder <repo>.git where I like map  the working directory with the contents of <repo>.git

[3] git commit -m also not commit into master.

Could any one please give me some clue ?

Thanks

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Coming from SVN world - need help
  2011-07-13 13:00 Coming from SVN world - need help J. Bakshi
@ 2011-07-13 13:17 ` Erik Faye-Lund
  2011-07-14  5:33   ` J. Bakshi
  0 siblings, 1 reply; 4+ messages in thread
From: Erik Faye-Lund @ 2011-07-13 13:17 UTC (permalink / raw)
  To: J. Bakshi; +Cc: git

On Wed, Jul 13, 2011 at 3:00 PM, J. Bakshi <joydeep@infoservices.in> wrote:
> And now the issues when I am trying to do the same with git
>
> [1] git init ${git_path}/<repo>.git  >>> ok , it is working

You probably want to add the "--bare"-flag if this is the repo that
will be published.

> [2] Problem with mapping a dir with this repo
>
> mydir $> git --username <username> --password <password> clone file:///${git_path}/<repo>.git
>
> Not working --username and --password .
>

You don't need username and password to clone over the file-system,
just the correct file-system permissions.

> [3] git commit -m also not commit into master.

git commit -m"foo" commits into the local branch that HEAD points to
(should be 'master' by default). You need to do "git push" to update
the published repo.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Coming from SVN world - need help
  2011-07-13 13:17 ` Erik Faye-Lund
@ 2011-07-14  5:33   ` J. Bakshi
  2011-07-14  6:08     ` Ramkumar Ramachandra
  0 siblings, 1 reply; 4+ messages in thread
From: J. Bakshi @ 2011-07-14  5:33 UTC (permalink / raw)
  To: kusmabite; +Cc: git

On Wed, 13 Jul 2011 15:17:36 +0200
Erik Faye-Lund <kusmabite@gmail.com> wrote:

> On Wed, Jul 13, 2011 at 3:00 PM, J. Bakshi <joydeep@infoservices.in> wrote:
> > And now the issues when I am trying to do the same with git
> >
> > [1] git init ${git_path}/<repo>.git  >>> ok , it is working
> 
> You probably want to add the "--bare"-flag if this is the repo that
> will be published.
> 
Actually the practical scenario is different than just a bare repo. The repos should be connected with its working copy located at htdocs directory. So whenever someone commit anything in git the corresponding working directory should be updated accordingly with a post-commit hook. I have done the same in svn but don't know how git will help to achieve this ? The main part, How can I simply map the folder in htdocs with it's master in git repo ? As "git clone" actually creates the parent folder. In svn it was easy with

````````````
cd mydir
mydir $> svn --username ${admin_svn} --password ${admin_svn_pass} co  file:///${svn_path}/${name_site}/trunk ./
``````````````

How can I achieve the same in git ?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Coming from SVN world - need help
  2011-07-14  5:33   ` J. Bakshi
@ 2011-07-14  6:08     ` Ramkumar Ramachandra
  0 siblings, 0 replies; 4+ messages in thread
From: Ramkumar Ramachandra @ 2011-07-14  6:08 UTC (permalink / raw)
  To: J. Bakshi; +Cc: kusmabite, git

Hi Bakshi,

J. Bakshi writes:
> Actually the practical scenario is different than just a bare repo. The repos should be connected with its working copy located at htdocs directory. So whenever someone commit anything in git the corresponding working directory should be updated accordingly with a post-commit hook. I have done the same in svn but don't know how git will help to achieve this ? The main part, How can I simply map the folder in htdocs with it's master in git repo ? As "git clone" actually creates the parent folder. In svn it was easy with

In the bare repo, set core.worktree to the htdocs directory*, and put
something like this in your hooks/post-receive:
#!/bin/sh
git checkout -f

* For more, read about detached worktrees in Git

-- Ram

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-07-14  6:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-13 13:00 Coming from SVN world - need help J. Bakshi
2011-07-13 13:17 ` Erik Faye-Lund
2011-07-14  5:33   ` J. Bakshi
2011-07-14  6:08     ` Ramkumar Ramachandra

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.