Re: [git-users] Applying patch to Drupal module

2013-06-25 Thread Konstantin Khomoutov
On Tue, 25 Jun 2013 06:10:11 -0700 (PDT)
Ben Alcantara  wrote:

> I'm using terminal but i've gone to the directory via the ftp
> command. How would I apply this patch via SSH, is it similar commands
> like FTP?

OK, I'm glad you decided to answer at least some of my questions.

No, FTP is not just a continuation of your shell -- while the interface
of a typical stock FTP client resembles that of the shell, it's not the
shell, and in particular FTP does not support execution of commands.

You basically have two options:

1) Install Git on the server.  Log into the server using SSH and hence
   get a *real* shell on the server.  Then you'll be able to execute any
   commands on the server (since you'll have a shell there).

   This options obviously requires SSH access to the server.
   And an administrator to install Git in it.

2) Somehow export a directory containing your repository either using
   a networking filesystem (NFS, SMB/CIFS or whatever) then mount it
   locally and work with the mounted directory using a local Git
   installation.

   If your local system is Linux-based you can mount a directory
   containing your Git repository onto your local system using
   SSHFS [1].  An upside of this is that it only requires SSH on the
   server.

Another, different, approach is to quit using Git on the server either
way and only perform deployment of a code which is ready to be deployed.
I mean, no fixups or Drupal module patching or whatnot is ever performed
directly on the server -- everything is done on a developer/sandbox
workstation, committed and then deployed on the server using a tool
like git-ftp [2] or rsync.

1. http://fuse.sourceforge.net/sshfs.html
2. https://github.com/git-ftp/git-ftp

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] Applying patch to Drupal module

2013-06-25 Thread Ben Alcantara
I'm using terminal but i've gone to the directory via the ftp command. How 
would I apply this patch via SSH, is it similar commands like FTP?

On Tuesday, 25 June 2013 01:32:43 UTC+10, Peter J Weisberg wrote:
>
> On Jun 24, 2013 8:20 AM, "Konstantin Khomoutov" <
> flat...@users.sourceforge.net > wrote:
> >
> > On Mon, 24 Jun 2013 08:08:49 -0700
> > PJ Weisberg > wrote:
> >
> > [...]
> >
> > > Are you trying to run git commands inside an ftp client, rather than
> > > in a shell?
> > >
> > > Try "!git apply example.patch".  Not just for Git, but for any
> > > commands you want to run on the remote machine.
> >
> > Sorry, but what is this supposed to mean?  In a typical interactive
> > Unix shell that `!' would re-execute the last command which name
> > begins with the string "git".  Did you mean FTP client then?  But since
> > when FTP started to support remote command execution?
> >
> > The `sftp` program of the OpenSSH suite supports `!' prefix as a way to
> > pass commands to a local shell rather than interpreting them, but the
> > OP did not talk about SFTP but rather about FTP, and in any case it's
> > a local shell which gets executed, not remote.
>
> Yeah, I remembered that immediately after I posted.  That function always 
> seemed odd to me--why would I log into a remote machine and run local 
> commands?--so I often forget that it works that way.
>
> And "I'm trying to use an ftp client as if it were a remote shell" is the 
> only interpretation of the OP's situation that made sense to me.  I didn't 
> watch the video, though.  ;-)
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] Applying patch to Drupal module

2013-06-24 Thread PJ Weisberg
On Jun 24, 2013 8:20 AM, "Konstantin Khomoutov" <
flatw...@users.sourceforge.net> wrote:
>
> On Mon, 24 Jun 2013 08:08:49 -0700
> PJ Weisberg  wrote:
>
> [...]
>
> > Are you trying to run git commands inside an ftp client, rather than
> > in a shell?
> >
> > Try "!git apply example.patch".  Not just for Git, but for any
> > commands you want to run on the remote machine.
>
> Sorry, but what is this supposed to mean?  In a typical interactive
> Unix shell that `!' would re-execute the last command which name
> begins with the string "git".  Did you mean FTP client then?  But since
> when FTP started to support remote command execution?
>
> The `sftp` program of the OpenSSH suite supports `!' prefix as a way to
> pass commands to a local shell rather than interpreting them, but the
> OP did not talk about SFTP but rather about FTP, and in any case it's
> a local shell which gets executed, not remote.

Yeah, I remembered that immediately after I posted.  That function always
seemed odd to me--why would I log into a remote machine and run local
commands?--so I often forget that it works that way.

And "I'm trying to use an ftp client as if it were a remote shell" is the
only interpretation of the OP's situation that made sense to me.  I didn't
watch the video, though.  ;-)

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] Applying patch to Drupal module

2013-06-24 Thread Konstantin Khomoutov
On Mon, 24 Jun 2013 08:08:49 -0700
PJ Weisberg  wrote:

[...]

> Are you trying to run git commands inside an ftp client, rather than
> in a shell?
> 
> Try "!git apply example.patch".  Not just for Git, but for any
> commands you want to run on the remote machine.

Sorry, but what is this supposed to mean?  In a typical interactive
Unix shell that `!' would re-execute the last command which name
begins with the string "git".  Did you mean FTP client then?  But since
when FTP started to support remote command execution?

The `sftp` program of the OpenSSH suite supports `!' prefix as a way to
pass commands to a local shell rather than interpreting them, but the
OP did not talk about SFTP but rather about FTP, and in any case it's
a local shell which gets executed, not remote.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] Applying patch to Drupal module

2013-06-24 Thread PJ Weisberg
On Jun 24, 2013 8:08 AM, "PJ Weisberg"  wrote:
>

> Try "!git apply example.patch".  Not just for Git, but for any commands
you want to run on the remote machine.

Oops, I remembered that wrong.  That's the syntax for running a local
command without exiting the ftp client.  If you want to run commands
remotely, you'll have to actually use SSH.  File transfer protocol is for
transferring files.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] Applying patch to Drupal module

2013-06-24 Thread PJ Weisberg
On Jun 24, 2013 7:08 AM, "Ben Alcantara"  wrote:
>
> My bad sorry for posting a 10mins+ video. Anywho yes I'm trying to update
a module folder remotely. Basically I was following a vid tutorial which
eventually executed 'git apply example.patch' but I just get 'invalid
command'. Is this because you can only patch Drupal modules locally?

Git doesn't treat Drupal modules specially in any way.

Are you trying to run git commands inside an ftp client, rather than in a
shell?

Try "!git apply example.patch".  Not just for Git, but for any commands you
want to run on the remote machine.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] Applying patch to Drupal module

2013-06-24 Thread Ben Alcantara
My bad sorry for posting a 10mins+ video. Anywho yes I'm trying to update a 
module folder remotely. Basically I was following a vid tutorial which 
eventually executed 'git apply example.patch' but I just get 'invalid 
command'. Is this because you can only patch Drupal modules locally?


On Monday, 24 June 2013 23:58:17 UTC+10, Konstantin Khomoutov wrote:
>
> On Mon, 24 Jun 2013 04:52:21 -0700 (PDT) 
> Ben Alcantara > wrote: 
>
> > I'm new to using Git and I'm a little confused. I'm trying to patch a 
> > module and I've gone to terminal and gone to the folder I need to 
> > patch via FTP. 
>
> Do I understand correctly, that you're using some FTP client and "gone 
> to the folder" in this context means you used that FTP client to 
> navigate to the remote directory containing the file to patch? 
>
> > I've been following this tutorial 
> > http://www.youtube.com/watch?v=i-oe7_qHreY 
>
> Please try to explain this in plain English: it's not really 
> appropriate to ask people to spend their time watching random videos 
> to help you solve your problem. 
>
> > but whenever I add the apply git command I get 'invalid command'. 
>
> What's the precise command you're trying to run and what's the precise 
> error message it generates?  Please do plain copying and pasting. 
>
> > Does Git only apply patches locally? What am I dong wrong? 
>
> Your question contains too little information to try to answer. 
>
> Running `git foo` tells me 
>
> git: 'foo' is not a git command. See 'git --help'. 
>
> Neither bash nor zsh do not use the wording "invalid command", and 
> nether does Windows shell (cmd.exe) so I'm not sure what happens as you 
> told us precisely zero information about your setup (note that the fact 
> you're dealing with Drupal is most probably irrelevant to the problem 
> in hand, and information about your system *is* relevant). 
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] Applying patch to Drupal module

2013-06-24 Thread Konstantin Khomoutov
On Mon, 24 Jun 2013 04:52:21 -0700 (PDT)
Ben Alcantara  wrote:

> I'm new to using Git and I'm a little confused. I'm trying to patch a 
> module and I've gone to terminal and gone to the folder I need to
> patch via FTP.

Do I understand correctly, that you're using some FTP client and "gone
to the folder" in this context means you used that FTP client to
navigate to the remote directory containing the file to patch?

> I've been following this tutorial 
> http://www.youtube.com/watch?v=i-oe7_qHreY

Please try to explain this in plain English: it's not really
appropriate to ask people to spend their time watching random videos
to help you solve your problem.

> but whenever I add the apply git command I get 'invalid command'.

What's the precise command you're trying to run and what's the precise
error message it generates?  Please do plain copying and pasting.

> Does Git only apply patches locally? What am I dong wrong?

Your question contains too little information to try to answer.

Running `git foo` tells me

git: 'foo' is not a git command. See 'git --help'.

Neither bash nor zsh do not use the wording "invalid command", and
nether does Windows shell (cmd.exe) so I'm not sure what happens as you
told us precisely zero information about your setup (note that the fact
you're dealing with Drupal is most probably irrelevant to the problem
in hand, and information about your system *is* relevant).

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[git-users] Applying patch to Drupal module

2013-06-24 Thread Ben Alcantara
I'm new to using Git and I'm a little confused. I'm trying to patch a 
module and I've gone to terminal and gone to the folder I need to patch via 
FTP.

I've been following this tutorial 
http://www.youtube.com/watch?v=i-oe7_qHreY but whenever I add the apply git 
command I get 'invalid command'. Does Git only apply patches locally? What 
am I dong wrong?


-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.