Re: [git-users] Git error on push : refusing to update checked out branch

2014-05-06 Thread Benjamin Fontaine

>
> Found out with searches the command work from localhost to server 
>
>> git push --set-upstream origin master
>
> + post-update hook and guess yeah, it works, thanks !
>

Finally, I just wanted ( since the start ) to get these commands & 
post-update hook location to get it working

-- 
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/d/optout.


Re: [git-users] Git error on push : refusing to update checked out branch

2014-05-06 Thread Benjamin Fontaine
Found out with searches the command work from localhost to server 

> git push --set-upstream origin master
>
gets stuck on total : 1815 (delta) etc .. 

+ post-update hook and guess yeah, it works, thanks !

-- 
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/d/optout.


Re: [git-users] Git error on push : refusing to update checked out branch

2014-05-06 Thread Magnus Therning
On Tue, May 6, 2014 at 8:38 AM, Benjamin Fontaine  wrote:
> Thanks for your replies, obviously I'm a beginner coming from svn
> and I've haven't found short & efficient tutorial at this time ( in my
> opinion, my free time being very rare )
>
> Things I've gotta do today :
>
> 1) git init -bare in /home/git
> 2) Add /home/www files "*.php" does not seem to include recursive one ( btw
> these are "remote files", will this work ? )

Just like in SVN you can only add files that are physically located in
a work area.  If you try you will get the error "fatal: /path/to/file:
'/path/to/file' is outside repository".

Regarding adding stuff recursively you have to keep in mind that
globbing (e.g. '*.php') is performed by the shell in unix/msys so read
the documentation for your shell on how to do that (in my shell, ZSH,
I'd have to write '**/*.c').

> 3) Clone on my localhost, checkout, commit, push
> 4) Home to "Post-commit" like svn ? Making each push on bare repo pushing
> files onto real destination ?

Item 4 here sounds a bit interesting, I bet you'll end up coming back
to the list for that ;)  Make sure to explain in more detail what it
is you are trying to achieve if you do.

/M

-- 
Magnus Therning  OpenPGP: 0xAB4DFBA4
email: mag...@therning.org   jabber: mag...@therning.org
twitter: magthe   http://therning.org/magnus

-- 
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/d/optout.


Re: [git-users] Git error on push : refusing to update checked out branch

2014-05-05 Thread Benjamin Fontaine
Thanks for your replies, obviously I'm a beginner coming from svn
and I've haven't found short & efficient tutorial at this time ( in my 
opinion, my free time being very rare )

Things I've gotta do today :

1) git init -bare in /home/git
2) Add /home/www files "*.php" does not seem to include recursive one ( btw 
these are "remote files", will this work ? )
3) Clone on my localhost, checkout, commit, push
4) Home to "Post-commit" like svn ? Making each push on bare repo pushing 
files onto real destination ?

-- 
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/d/optout.


Re: [git-users] Git error on push : refusing to update checked out branch

2014-05-05 Thread Benjamin Fontaine

>
> Thanks for your replies, obviously I'm a beginner coming from svn
> and I've haven't found short & efficient tutorial at this time ( in my 
> opinion, my free time being very rare )
>
> Things I've gotta do today :
>
> 1) git init -bare in /home/git
> 2) Add /home/www files "*.php" does not seem to include recursive one ( 
> btw these are "remote files", will this work ? )
> 3) Clone on my localhost, checkout, commit, push
> 4) How to "Post-commit" like svn ? Making each push on bare repo pushing 
> files onto real destination 
>

-- 
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/d/optout.


Re: [git-users] Git error on push : refusing to update checked out branch

2014-05-04 Thread Gergely Polonkai
Hello,

you are using a non-bare repository on the remote side. Such repositories
always have a branch checked out (read: the contents of its commits are
written to actual files on the disk). On the other side, bare repositories
are just that: bare. This means that they store all commits, but not in
actual files, but in git objects.

When you push your changes to a remote bare repository, your commits are
simply copied over to the other machine (OK, there are several other things
happening, but let’s see only the basic picture now).

When the remote is not bare with the branch master checked out, and you
push your branch ben, the story is just the same as with bare repositories.
However, if you are pushing ben while that branch is checked out (read: its
contents exist as actual files), those files would be overwritten, which is
not recommended (thus, refused by git).

If you don’t need the files on the remote site, just want to store your
commits at another place, you should remove your remote directory (after
saving your work to your local copy, if any!), and recreate it with git
init --bare. If, however, you do need those files, you should either use an
intermediate bare repository, where you can push from your local, and pull
from there on your current remote), or have a somewhat complicated workflow
involving branch-creation/deletion before every push.

Also, if you are really new to git, you should read some getting started
docs, like [1].

Best,
Gergely

PS: Using Linux as root is a bad idea ;)

[1] http://git-scm.com/book/en/Getting-Started


On 4 May 2014 22:51, Benjamin Fontaine  wrote:

> Hello and thanks for this group
> I'm new to Git ( I was asked to learn it in my last job interviews, and
> I've configured it this far .. )
> Master on my webserver, did a clone, put both to branch "ben",  did
> commit, and then the push fails
>
> 
>
> Any ideas ?
> Thank in advance for further comments
>
> --
> 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/d/optout.
>

-- 
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/d/optout.


Re: [git-users] Git error on push : refusing to update checked out branch

2014-05-04 Thread Philip Oakley
The error message says it all.

The problem is that you have a non-bare repository. You cannot 'push' your 
personal content onto the content of the remote potentially overwriting someone 
elses work.

A bare repository doe not have any work tree with checked out content, so you 
can't over write it!

You can push to a non-checked out branch on a remote as long as it is a fast 
forward (I do it myself on a network drive where other aren't aware of the 
hidden git directory, and only see the perfectly polished results on master;-)

Time for a bit more reading of the man pages, and the tutorials, and user 
guide..

Philip
  - Original Message - 
  From: Benjamin Fontaine 
  To: git-users@googlegroups.com 
  Sent: Sunday, May 04, 2014 9:51 PM
  Subject: [git-users] Git error on push : refusing to update checked out branch


  Hello and thanks for this group
  I'm new to Git ( I was asked to learn it in my last job interviews, and I've 
configured it this far .. )
  Master on my webserver, did a clone, put both to branch "ben",  did commit, 
and then the push fails



  Any ideas ? 
  Thank in advance for further comments


  -- 
  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/d/optout.

-- 
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/d/optout.


[git-users] Git error on push : refusing to update checked out branch

2014-05-04 Thread Benjamin Fontaine


Hello and thanks for this group
I'm new to Git ( I was asked to learn it in my last job interviews, and 
I've configured it this far .. )
Master on my webserver, did a clone, put both to branch "ben",  did commit, 
and then the push fails



Any ideas ? 
Thank in advance for further comments

-- 
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/d/optout.