Re: [git-users] git push --recurse-submodules not recursing

2019-03-06 Thread Philip Oakley
I think (but I'm no expert here) that this is a current limitation that 
is slowly being worked on upstream.


If you want to have a look at the developer list discussions try 
https://public-inbox.org/git/?q=git+push+--recurse-submodules (adjust 
the search to taste...)


Stephan Beller is the power behind the development. Also confirm that 
you have the right settings enabled, e.g. this confusion 
https://public-inbox.org/git/cagz79kabctd9uvw+gpxxjgf8bfiqvmkhka4up8gc_kxjdv-...@mail.gmail.com/



Philip

On 05/03/2019 00:19, David E wrote:
I have a case where we have a repository with nested submodules.  If I 
make a change in the lowest level submodule and do a push with the 
recurse flag from its parent, there are no issues.  However, if I jump 
to the grandparent repository, it will recurse into the parent to push 
(or check), but not into the lower child.


For a test, assume:
- /   #  Root repo, "git push recurse-submodules" will find and push 
changes in parent/Level1, but does not check Level 2.
- /parent    # Submodule, Level 1.  "git push recurse-submodules" 
works as expected at this level.

- /parent/child  # Submodule, Level 2


Is this behavior that's not supported, a bug, or am I doing something 
wrong here?


thanks,
-David
--
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 push --recurse-submodules not recursing

2019-03-04 Thread David E
I have a case where we have a repository with nested submodules.  If I make 
a change in the lowest level submodule and do a push with the recurse flag 
from its parent, there are no issues.  However, if I jump to the 
grandparent repository, it will recurse into the parent to push (or check), 
but not into the lower child.  

For a test, assume:
- /   #  Root repo, "git push recurse-submodules" will find and push 
changes in parent/Level1, but does not check Level 2.
- /parent# Submodule, Level 1.  "git push recurse-submodules" works as 
expected at this level.
- /parent/child  # Submodule, Level 2


Is this behavior that's not supported, a bug, or am I doing something wrong 
here?  

thanks,
-David

-- 
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 push receive action - Show PR Page in Webbrowser

2018-07-25 Thread Michael Ruepp
Hi,

I try to figure out how I can invoke a post push action which should be to 
invoce a webbrowser with the correct PR link which is displayed after a 
push to origin/remote like this:

POST git-receive-pack (613 bytes)
remote: 
remote: Create pull request for :
remote:  
 
https://giturl/urltorepo/compare/commits?sourceBranch=refs/heads/
  
  
remote: 
Branch '' set up to track remote branch '' 
from 'origin'.
Pushing to https://user@giturl/urltorepo.git
To https://giturl/urltorepo.git
 * [new branch]   -> 
updating local tracking ref 'refs/remotes/origin/mr/'

So I want to invoke to launch a browser page with the url I get back as 
remote which (at least with bitbucket) will give me the PR page prefilled 
with the branches.

Can someone give me a head start here?

Thanks,

Mike

-- 
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 push overwrote remote's files instead of merging. What could have caused this?

2016-12-19 Thread AD S
Ah thanks!

On Monday, December 19, 2016 at 6:19:05 PM UTC+10, Konstantin Khomoutov 
wrote:
>
> On Sun, 18 Dec 2016 23:12:36 -0800 (PST) 
> AD S > wrote: 
>
> > I pushed some files to my remote server, same as I have always done 
> > for this project. I was expecting to have merge conflicts which I 
> > would fix but I got none. I checked the remote server and saw that my 
> > adjusted files had completely overwritten the files on that server, 
> > meaning that I have now lost heaps of work from other branches. 
> > 
> > Would anyone know what might have caused this? 
> > 
> > My steps were: 
> > 
> >1. git add . 
> >2. git commit 
> >3. git push ${project} ${refspec} 
> >4. git merge ${refspec} 
> >5. git push ${project} ${server} 
>
> You appear to miss one crucial point about Git's interaction with 
> remote repositories: the `git push` operation does not fetch remote 
> changes -- only pushes yours. 
>
> Hence your step (3) merely sent your changes to the remote repository 
> where they were either accepted or rejected. 
>
> Before doing (4) you were supposed to get fetch the remote changes -- 
> to actually have stuff to merge your changes with. 
>
> It seems, that (4) was a no-op then, and from your 
> > my adjusted files had completely overwritten the files on that server 
> it appears that when doing (5), you instructed Git to do the so-called 
> "force push" (by passing that command the "-f" or "--force" 
> command-line option).  Force push literally means "throw away the 
> changes which would conflict with mine, and take those of mine 
> instead" (and hence you should never do this until absolutely 100% sure 
> about what you're doing). 
>
> So I'd say you're lacking a fair bit of knowledge regarding proper 
> workflow to be used with remote repositories.  If yes, yo need to cover 
> this gap.  Supposedly start with [1], and I'd also recommend reading [2] 
> then. 
>
> 1. https://git-scm.com/book/en/v2/Git-Branching-Remote-Branches 
> 2. https://longair.net/blog/2009/04/16/git-fetch-and-merge/ 
>

-- 
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 push overwrote remote's files instead of merging. What could have caused this?

2016-12-19 Thread Nelson Efrain A. Cruz
The only way that I remember right now to overwrite changes (history) in a
"push" is with the -f option, if you havent used that option in "push" then
maybe you are misunderstanding something.

You were the only one working on that repo?
Why did you expect merge conflicts?
When you say "remote server", you're talking about a remote repository?

El lun., 19 de dic. de 2016 a la(s) 04:12, AD S 
escribió:

> I pushed some files to my remote server, same as I have always done for
> this project. I was expecting to have merge conflicts which I would fix but
> I got none. I checked the remote server and saw that my adjusted files had
> completely overwritten the files on that server, meaning that I have now
> lost heaps of work from other branches.
>
> Would anyone know what might have caused this?
>
> My steps were:
>
>
>1. git add .
>2. git commit
>3. git push ${project} ${refspec}
>4. git merge ${refspec}
>5. git push ${project} ${server}
>
> --
> 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 push overwrote remote's files instead of merging. What could have caused this?

2016-12-19 Thread Konstantin Khomoutov
On Sun, 18 Dec 2016 23:12:36 -0800 (PST)
AD S  wrote:

> I pushed some files to my remote server, same as I have always done
> for this project. I was expecting to have merge conflicts which I
> would fix but I got none. I checked the remote server and saw that my
> adjusted files had completely overwritten the files on that server,
> meaning that I have now lost heaps of work from other branches.
> 
> Would anyone know what might have caused this?
> 
> My steps were:
> 
>1. git add .
>2. git commit
>3. git push ${project} ${refspec}
>4. git merge ${refspec}
>5. git push ${project} ${server}

You appear to miss one crucial point about Git's interaction with
remote repositories: the `git push` operation does not fetch remote
changes -- only pushes yours.

Hence your step (3) merely sent your changes to the remote repository
where they were either accepted or rejected.

Before doing (4) you were supposed to get fetch the remote changes --
to actually have stuff to merge your changes with.

It seems, that (4) was a no-op then, and from your
> my adjusted files had completely overwritten the files on that server
it appears that when doing (5), you instructed Git to do the so-called
"force push" (by passing that command the "-f" or "--force"
command-line option).  Force push literally means "throw away the
changes which would conflict with mine, and take those of mine
instead" (and hence you should never do this until absolutely 100% sure
about what you're doing).

So I'd say you're lacking a fair bit of knowledge regarding proper
workflow to be used with remote repositories.  If yes, yo need to cover
this gap.  Supposedly start with [1], and I'd also recommend reading [2]
then.

1. https://git-scm.com/book/en/v2/Git-Branching-Remote-Branches
2. https://longair.net/blog/2009/04/16/git-fetch-and-merge/

-- 
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 push overwrote remote's files instead of merging. What could have caused this?

2016-12-18 Thread AD S
I pushed some files to my remote server, same as I have always done for 
this project. I was expecting to have merge conflicts which I would fix but 
I got none. I checked the remote server and saw that my adjusted files had 
completely overwritten the files on that server, meaning that I have now 
lost heaps of work from other branches.

Would anyone know what might have caused this?

My steps were:


   1. git add .
   2. git commit
   3. git push ${project} ${refspec}
   4. git merge ${refspec}
   5. git push ${project} ${server}
   

-- 
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 push works but there is a fetch error message.

2016-08-24 Thread Ghislain Rodrigues
Hi,

most likely someone pushed develop before you and therefore you need to
pull (or pull --rebase depending on how your team works) to then be able to
push.
An other possibility is that you rebased some already pushed commits of
develop.

I hope it helps, let me know if you need anything.

Cheers

Ghislain

On 24 August 2016 at 00:56,  wrote:

> I am getting this strange ![rejected]  branch->branch (fetch first) error
> during git push. The push itself works just fine however, this error is
> creating a lot of confusion. I am a basic user of push and not very
> knowledgeable about the HEAD concept. Can someone explain what is going on?
> Thanks.,
>
> $git push
> Counting objects: 1358, done.
> Compressing objects: 100% (225/225), done.
> Writing objects: 100% (842/842), 129.49 KiB | 0 bytes/s, done.
> Total 842 (delta 684), reused 762 (delta 614)
>
> To repo@10.0.0.1:/repo/data/tests.git
>9d7e36a..79da402  develop -> develop
>  ! [rejected]develop -> develop (fetch first)
>
> error: failed to push some refs to 'repo@10.0.0.1:/repo/data/tests.git'
>
> hint: Updates were rejected because the remote contains work that you do
> hint: not have locally. This is usually caused by another repository
> pushing
> hint: to the same ref. You may want to first merge the remote changes
> (e.g.,
> hint: 'git pull') before pushing again.
> hint: See the 'Note about fast-forwards' in 'git push --help' for details.
>
>
>
> --
> 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 push works but there is a fetch error message.

2016-08-23 Thread alexisdroid000
I am getting this strange ![rejected]  branch->branch (fetch first) error 
during git push. The push itself works just fine however, this error is 
creating a lot of confusion. I am a basic user of push and not very 
knowledgeable about the HEAD concept. Can someone explain what is going on? 
Thanks.,

$git push
Counting objects: 1358, done.
Compressing objects: 100% (225/225), done.
Writing objects: 100% (842/842), 129.49 KiB | 0 bytes/s, done.
Total 842 (delta 684), reused 762 (delta 614)

To repo@10.0.0.1:/repo/data/tests.git
   9d7e36a..79da402  develop -> develop
 ! [rejected]develop -> develop (fetch first)

error: failed to push some refs to 'repo@10.0.0.1:/repo/data/tests.git'

hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first merge the remote changes (e.g.,
hint: 'git pull') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.



-- 
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 Push Remote

2016-04-09 Thread Dok
I've got something I'm working with that, for the lack of a better, I'm 
wanting to ensure takes place for a client of mine.

I access the remote repository and grab the code base to modify a web app. 
I then have to actually push anything to a branch off that base (*v_bridge*
).
*$> git checkout v_bridge*
{do some work - need to commit & push this to b_000121}

The way the client has defined their 'normal' process (*to which I had no 
knowledge*) is as follows:
** normal procedure (defined by client) is usually :*
** git checkout v_bridge*
** git branch b_000121*
** git publish b_000121*
** git checkout b_000121*
** do some work*
** git commit {filename.php}*
** git push origin b_000121*

So, bearing that in mind I just wanted to see what was happening. Checking 
the remote revealed as follows:
*$> git remote -v*
*origin  g...@xxx.xxx.xxx.xxx:/opt/git/lms.git (fetch)*
*origin  g...@xxx.xxx.xxx.xxx:/opt/git/lms.git (push)*

OK... all good. Checking the specifics for the remote - lots of irrelevant 
things here removed for brevity - that everything is setup OK, but of 
course I'm 'out of date' on the local server.
*$> git remote show origin*
** remote origin*
*  Fetch URL: git@67.212.178.194:/opt/git/lms.git*
*  Push  URL: git@67.212.178.194:/opt/git/lms.git*
*  HEAD branch: master*
*  Remote branches:*
*b_000120 tracked*
*b_000121 tracked*
*b_000122 tracked*
*b_000123 tracked*
*v_bridge   tracked*
*  Local branches configured for 'git pull':*
*master   merges with remote master*
*v_bridge merges with remote v_bridge*
*  Local refs configured for 'git push':*
*master   pushes to master   (up to date)*
*v_bridge pushes to v_bridge (local out of date)*

Checking the local status displays what I've done on the local server.
*$> git status*
*# Changes not staged for commit:*
*#   (use "git add/rm ..." to update what will be committed)*
*#   (use "git checkout -- ..." to discard changes in working 
directory)*
*#*
*# modified: code.php*
*# deleted: old_code.php*

*#*
*# Untracked files:*
*# (use "git add ..." to include in what will be committed)*
*#*
*# added_code.php*
*no changes added to commit (use "git add" and/or "git commit -a")*

So after getting the files added, staged and commits finished locally (
*v_bridge*) - client wants changes pushed to '*b_000121*'. For whatever 
reason, the '*git push*' operation is confusing the hell out of me... what 
operation(s) would get this done without making a mess of things on the 
remote:

*$> git push origin b_000121*
*or*
*$> git push remote v_bridge:b_000121*
*or*
*$> git push remote master:b_000121 *
*or*
*$> git push ???*

Ultimately, the goal is ensuring a '*git checkout b_000121*' picks up all 
changes committed and pushed correctly by anyone then pulling the source. I 
would then sync things locally on this server by checking out and 
re-pulling '*b_000121*' for any additional things that arise. Anything I'm 
missing or doesn't look correctly thought out?

*The Goal*
1) Get these (*important*) local changes committed to b_000121
2) Ensure all subsequent checkout/pull requests by anyone for b_000121 pick 
up all changes correctly
3) Reset the local to b_000121 to track all subsequent work / changes

Thanx SO MUCH in advance for any all input, ideas, constructive 
criticisms... it's ALL welcomed and greatly appreciated!

--
Dok


-- 
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 push URL encoding issue

2015-09-03 Thread Konstantin Khomoutov
On Thu, 3 Sep 2015 10:01:01 -0700 (PDT)
Bideep Bezbaruah  wrote:

> This is a service consumed by many users and there is a validation 
> requirement where every user trying to use this service, needs to be 
> authenticated against the repo that is passed. For ex: User '23784'
> needs to be authenticated against
> https://github.company.com/abcd/devrepo URL before allowing to
> proceed further.

Yes, this is quite obvious. This is how any single-pass authentication
works. ;-)

> I know about the security concern and also this
> works with GitHub access tokens and even with passwords without
> special characters. Just trying to see if there is a way to make it
> work with encoded password.

May be I failed to convey my question properly, but *normally* you
don't encode credentials into URLs when working with Git, and instead
you're either using the so-called "netrc" file for libcurl (a library
used by Git to access repos via http[s]://) or a credential helper
-- a program which supplies Git with credentials (which it obtains from
whatever medium it is taught to operate with).

So the question remains: why are you trying to solve this problem
asswards instead of just doing what everyone else normally do?
And so may be it's just simpler to learn about the netrc file and use
it -- hence forgoing the original problem completely?

-- 
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 push URL encoding issue

2015-09-03 Thread Bideep Bezbaruah
This is a service consumed by many users and there is a validation 
requirement where every user trying to use this service, needs to be 
authenticated against the repo that is passed. For ex: User '23784' needs 
to be authenticated against https://github.company.com/abcd/devrepo URL 
before allowing to proceed further. I know about the security concern and 
also this works with GitHub access tokens and even with passwords without 
special characters. Just trying to see if there is a way to make it work 
with encoded password.


On Thursday, 3 September 2015 12:44:02 UTC-4, Konstantin Khomoutov wrote:
>
> On Thu, 3 Sep 2015 09:24:40 -0700 (PDT) 
> Bideep Bezbaruah > wrote: 
>
> > I have a use case to push files to git using command like: 
> > 
> > git push https://:github.company.com/abcd/devrepo 
> > > master:master 
> > 
> > But, if the password contains special characters like ‘@’ and ‘$’, I 
> > am converting it to hex code like ‘%40’ and %24. 
> > 
> > So, the URL looks like 
> > 
> > https://23784:abcd%40%241...@github.company.com/abcd/devrepo 
> > 
> > I was thinking it should work since I am encoding the special 
> > character, but it throws 403 error everytime. This works fine for 
> > password without special characters where we don’t need to encode any 
> > characters. 
>
> Before we'll try to do something about this... 
>
> Your approach stinks security-wise.  Are you sure you really do have no 
> technical possibility to use ~/.netrc or a custom Git credential helper 
> to make this work without encoding credentials into URLs? 
>

-- 
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 push URL encoding issue

2015-09-03 Thread Konstantin Khomoutov
On Thu, 3 Sep 2015 09:24:40 -0700 (PDT)
Bideep Bezbaruah  wrote:

> I have a use case to push files to git using command like:
> 
> git push https://:github.company.com/abcd/devrepo 
> > master:master
> 
> But, if the password contains special characters like ‘@’ and ‘$’, I
> am converting it to hex code like ‘%40’ and %24.
> 
> So, the URL looks like
> 
> https://23784:abcd%40%241...@github.company.com/abcd/devrepo
> 
> I was thinking it should work since I am encoding the special
> character, but it throws 403 error everytime. This works fine for
> password without special characters where we don’t need to encode any
> characters.

Before we'll try to do something about this...

Your approach stinks security-wise.  Are you sure you really do have no
technical possibility to use ~/.netrc or a custom Git credential helper
to make this work without encoding credentials into URLs?

-- 
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 push URL encoding issue

2015-09-03 Thread Bideep Bezbaruah


I have a use case to push files to git using command like:


git push https://:github.company.com/abcd/devrepo 
> master:master


But, if the password contains special characters like ‘@’ and ‘$’, I am 
converting it to hex code like ‘%40’ and %24.


So, the URL looks like


https://23784:abcd%40%241...@github.company.com/abcd/devrepo


I was thinking it should work since I am encoding the special character, 
but it throws 403 error everytime. This works fine for password without 
special characters where we don’t need to encode any characters.


What am I doing wrong here?

-- 
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 push does not update remote workdir

2015-05-01 Thread Thomas Ferris Nicolaisen
On Friday, May 1, 2015 at 11:08:43 PM UTC+2, Thomas Ferris Nicolaisen wrote:
>
> On Wednesday, April 29, 2015 at 1:53:42 PM UTC+2, Konrád Lőrinczi wrote:
>>
>> Unfortunately push-to-checkout did not result files in workdir after 
>> pushing to server, so it was not usable for me.
>>
>>>
>>> 
>>>
>>
> Not sure if I'm missing out on something obvious here, but 
> push-to-checkout works as expected when trying it out:
>

Correction: the push-to-checkout hook only works since Git 2.4.

Git 2.3 introduced this updateInstead configuration, which is what I showed 
off in my example. The push-to-checkout hook is more a fix for those cases 
where the target repository gets manipulated between pushes or something 
like that. Depending on your use-case you may not need that.

-- 
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 push does not update remote workdir

2015-05-01 Thread Thomas Ferris Nicolaisen
On Wednesday, April 29, 2015 at 1:53:42 PM UTC+2, Konrád Lőrinczi wrote:
>
> Unfortunately push-to-checkout did not result files in workdir after 
> pushing to server, so it was not usable for me.
>
>>
>> 
>>
>
Not sure if I'm missing out on something obvious here, but push-to-checkout 
works as expected when trying it out:

# Note that Git version must be >= 2.3
[master][~/temp/foo-web]$ git --version
git version 2.3.6 

# Take some random repo and clone it to a "remote" location:
[~/temp]$ git clone foo foo-web
Cloning into 'foo-web'...
done.


# So, let's pretend that this non-bare repository is on our web-host:
[~/temp]$ cd foo-web

# Configure allowing incoming pushes
[master][~/temp/foo-web]$ git config receive.denyCurrentBranch updateInstead

# Create the basic hook, as examplified in the test in 
 https://github.com/git/git/commit/0855331941b723b227e93b33955bbe0b45025659
[master][~/temp/foo-web]$ vim .git/hooks/push-to-checkout

### contents of the push-to-checkout hook:

/bin/sh
echo >&2 updating from $(git rev-parse HEAD)
echo >&2 updating to "$1"

git update-index -q --refresh && git read-tree -u -m HEAD "$1" || {
status=$?
echo >&2 read-tree failed
exit $status
}

## EOF


# Make the hook executable
[master][~/temp/foo-web]$ chmod +x .git/hooks/push-to-checkout

#Now let's take it for a spin. Go back to the original repo:
[master][~/temp/foo-web]$ cd ..
[~/temp]$ cd foo
[master][~/temp/foo]$ git remote add web ../foo-web
[master][~/temp/foo]$ git push web master
Everything up-to-date

# OK, that wasn't very impressive. Make some changes first, a new file for 
example:
[master][~/temp/foo]$ echo `random_word` >> heya.txt; git add .;git commit 
-m `random_word`
[master b6765e2] overpaint
 1 file changed, 1 insertion(+)
 create mode 100644 heya.txt

# Away we go:
[master][~/temp/foo]$ git push web master
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 322 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To ../foo-web
   eb2711a..b6765e2  master -> master
[master][~/temp/foo]$ cd ..
[~/temp]$ cd foo-web

# TADA:
[master][~/temp/foo-web]$ ls
README   foo  heya.txt

Does that work for you?

-- 
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 push does not update remote workdir

2015-04-30 Thread Konrád Lőrinczi
Unfortunately push-to-checkout did not result files in workdir after 
pushing to server, so it was not usable for me.


push-to-checkout file content:
#!/bin/sh
export GIT_WORK_TREE=/domains/site/test-workdir/.
export GIT_DIR=/domains/git/site-bare.git/
cd $GIT_DIR
git checkout -f


The steps I do:
$ git status
On branch master
Your branch is up-to-date with 'web/master'.
nothing to commit, working directory clean


$ git push web
warning: push.default is unset; its implicit value has changed in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the traditional behavior, use:

  git config --global push.default matching

To squelch this message and adopt the new behavior now, use:

  git config --global push.default simple

When push.default is set to 'matching', git will push local branches
to the remote branches that already exist with the same name.

Since Git 2.0, Git defaults to the more conservative 'simple'
behavior, which only pushes the current branch to the corresponding
remote branch that 'git pull' uses to update the current branch.

See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)

root@192.168.1.101 password:
Everything up-to-date


# On server:
ls /domains/site/test-workdir
# empty result, push did not check out the content into the workdir 


# On local repo (add a file to commit):
touch 1test/test6


$ git status
On branch master
Your branch is up-to-date with 'web/master'.
Untracked files:
  (use "git add ..." to include in what will be committed)

1test/test6

nothing added to commit but untracked files present (use "git add" to track)


# stage it
$ git add .


# commit
$ git commit -m "test6 commit"
[master 30d1de6] test6 commit
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 1test/test6


# now push to remote
$ git push web
warning: push.default is unset; its implicit value has changed in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the traditional behavior, use:

  git config --global push.default matching

To squelch this message and adopt the new behavior now, use:

  git config --global push.default simple

When push.default is set to 'matching', git will push local branches
to the remote branches that already exist with the same name.

Since Git 2.0, Git defaults to the more conservative 'simple'
behavior, which only pushes the current branch to the corresponding
remote branch that 'git pull' uses to update the current branch.

See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)

root@192.168.1.101 password:
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 298 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
To ssh:root@192.168.1.101/domains/git/site-bare.git
   9f9ab91..30d1de6  master -> master



# On server:
ls /domains/site/test-workdir
# empty result, push did not check out the content into the workdir 
# at this point, using post-receive or post-update hook, the workdir 
content appeared.

The example above shows, that push-to-checkout does not work as I wanted, 
no files updated in workdir, even if there was a commit.


It seems, that post-receive or post-update hook is what somewhat works for 
me.
My problem with post-receive is, that it needs a commit to be able to 
update content of workdir.

Any idea how to trigger a workdir update with a single
git push web 
command?


Thanks,
Konrad

2015. április 28., kedd 11:21:58 UTC+2 időpontban Thomas Ferris Nicolaisen 
a következőt írta:
>
> I didn't get into the details of this discussion, but I just wanted to 
> shoot in that there is a new hook since Git 2.3 called "push-to-checkout". 
> Perhaps that would be the right thing here. Nice to know about anyhow:
>
> https://github.com/git/git/commit/0855331941b723b227e93b33955bbe0b45025659
>

-- 
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 push does not update remote workdir

2015-04-28 Thread Thomas Ferris Nicolaisen
I didn't get into the details of this discussion, but I just wanted to 
shoot in that there is a new hook since Git 2.3 called "push-to-checkout". 
Perhaps that would be the right thing here. Nice to know about anyhow:

https://github.com/git/git/commit/0855331941b723b227e93b33955bbe0b45025659

-- 
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 push does not update remote workdir

2015-04-27 Thread Konrád Lőrinczi
I learned a lot about git usage from you, so thanks for your suggestions & 
help!

I tried your suggestions, and found no additional error message, which can 
explain why the working dir is not updated. 

BUT: you wrote, that the working dir is updated only, when there was at 
least one change in local repo, it was committed, then I push to the git 
bare repo on the server.
Yeah, it seems, this was the cause why the working dir was not updated.

I tried the post-update hook, too, but no difference.

My problems:
1) Basically I would like to update the working dir, when I do a git push 
to the server.
Is it possible?


2) My second problem, what happens, when I delete a file from the local 
repo?
Is it also deleted from the working dir?
So 
git checkout -f
does a copy (which leaves deleted files in target dir)?
or
does a mirror (which deletes the deleted files from target dir, so will 
always have exactly the same content )?

Basically I would need mirroring.


Any ideas for these 2 problems?


Thanks is advance,
Konrad Lorinczi





2015. április 24., péntek 21:42:47 UTC+2 időpontban Konstantin Khomoutov a 
következőt írta:
>
> On Fri, 24 Apr 2015 11:59:33 -0700 (PDT) 
> Konrád Lőrinczi > wrote: 
>
> [...] 
> > mkdir /domains/git/site-bare.git 
> > cd /domains/git/site-bare.git 
> > git --git-dir=. --work-tree=/domains/site/test-workdir/. init 
> > git config receive.denycurrentbranch ignore 
> > cd /domains/git/site-bare.git/hooks 
> > nano post-receive 
> > # add the following content until # end 
> > #!/bin/sh 
> > export GIT_WORK_TREE=/domains/site/test-workdir/. 
> > export GIT_DIR=/domains/git/site-bare.git/.git 
>
> ^^^ This. 
>
> The GIT_DIR environment variable tells Git where the "Git database 
> directory" is located. 
> But a bare Git repo *is* the Git database directory in itself. 
> That makes it different from a "normal" Git repository, in which the 
> root directory is the so-called work tree, and the Git database 
> directory is typically located beneath and called ".git". 
>
> Obviously, in a bare repo, there's no ".git" subdirectory. 
> Bare repos even typically have the ".git" suffix appended to their names 
> precisely to signify they already are ".git directories". 
>
> [...] 
>
> > git push web-remote master 
> > 
> > 
> > Once I also got the 
> [...] 
> > remote: fatal: Not a git repository: 
> > '/domains/git/site-bare.git/.git' 
>
> That most probably was the message a Git program run from your hook 
> script yelled at you.  Since you did not enable/provide proper error 
> reporting in your hook script, even though `git checkout` failed with 
> that error message, the script continued to chug along and hence the 
> receive operation succeeded. 
>
> [...] 
> > Later I did not get such "Not a git repository" error. 
>
> Did the hook run? 
> If you had no new commits to push, the hook was not run. 
>
> > But anyway, the workdir is not filled with content, this is my 
> > problem. 
> > 
> > UPDATE: If I do "git checkout -f" of the server, then the workdir is 
> > updated. So this means that the post-receive hook is not executed. 
> > 
> > Any idea why the remote workdir is not updated? 
>
> There are many issues with your approach. 
>
> The first one is that your GIT_DIR setting is incorrect (and outright 
> nonsensical) as I expained above.  But I'd say it is not needed at all: 
> when the hook runs, it already has all the Git-related settings in its 
> environment.  So you only has to provide it with the location of your 
> work tree. 
>
> The second problem is that the hook is supposed to fail (that is, to 
> exit with a non-zero exit code; supposedly having printed out an error 
> message to the standard error stream before doing that) as soon as it 
> encounters an error.  In your case I'd start with placing the line 
>
>   set -e -u 
>
> somewhere right after the shebang line (that #!/bin/sh thing).  This 
> would ask the shell to crash and burn as soon as any command it 
> executed failed (and that was not properly handled by the script) or 
> the script attempts to dereference a variable which was not assigned a 
> value. 
>
> I would also say that the correct event for the hook like yours is 
> post-update, not post-receive.  Receiving deals with, well, receiving, 
> while post-update means the heads (branches) were already updated with 
> their new commits. 
>
> And another pro-tip.  If you need to debug a script, running 
> non-interactively, a useful "trick" is to wrap it in another script, 
> something like this: 
>
>   #!/bin/sh 
>   set -e -u 
>   orig="`dirname '$0'`/post-update.orig" 
>   exec /bin/sh -x "$orig" $@ >/var/tmp/my-hook-trace.log 2>&1 
>
> Where your post-update.orig is the original script to debug, and the 
> script I showed is temporarily made the post-update hook. 
> The "-x" command-line option instructs the shell to trace the execution 
> of the script it's told to run, and that trace ends up in the log

Re: [git-users] git push does not update remote workdir

2015-04-27 Thread Konstantin Khomoutov
On Fri, 24 Apr 2015 12:54:57 -0700 (PDT)
Konrád Lőrinczi  wrote:

> Well, I noticed, that I had a bug in  post-receive hook, so here is
> the fixed one:
> 
> #!/bin/sh
> export GIT_WORK_TREE=/domains/site/test-workdir/
> export GIT_DIR=/domains/git/site-bare.git/
> cd $GIT_DIR
> git checkout -f
> 
> However, the problem still remains.
> 
> Also GIT_TRACE=1 did not help, there was no any useful info.

GIT_TRACE only traces your local Git instance, and has nothing to do
with the Git process working on the server side.

On the other hand, exporting GIT_TRACE=1 will be an interesting thing
to do before running `git checkout -f` if you're debugging your hook
script like I have outlined in my first response.

P.S.
I would restate that you supposedly has to start using `set -e` or,
better, `set -e -u` in your hook script.  Start with [1] and the
pointers it gives.  Otherwise your hook script, as a program, is almost
as broken with regard to error handling as a typical PHP program: when
an error happens, it gets logged somewhere and the execution continues.
This is a broken logic: if you *know* you should ignore an error
running a particular command, you specifically arrange for ignoring its
error return, like with

  a_command_which_is_ok_to_fail || true

to make the script not exit when that command fails.
Otherwise anything which gone wrong will terminate the scipt.

1. http://serverfault.com/q/143445/118848

-- 
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 push does not update remote workdir

2015-04-24 Thread Konrád Lőrinczi
Well, I noticed, that I had a bug in  post-receive hook, so here is the 
fixed one:

#!/bin/sh
export GIT_WORK_TREE=/domains/site/test-workdir/
export GIT_DIR=/domains/git/site-bare.git/
cd $GIT_DIR
git checkout -f

However, the problem still remains.

Also GIT_TRACE=1 did not help, there was no any useful info.

I will test your suggestion(s) to debug the problem.


Regards,
Konrad


2015. április 24., péntek 21:42:47 UTC+2 időpontban Konstantin Khomoutov a 
következőt írta:
>
> On Fri, 24 Apr 2015 11:59:33 -0700 (PDT) 
> Konrád Lőrinczi > wrote: 
>
> [...] 
> > mkdir /domains/git/site-bare.git 
> > cd /domains/git/site-bare.git 
> > git --git-dir=. --work-tree=/domains/site/test-workdir/. init 
> > git config receive.denycurrentbranch ignore 
> > cd /domains/git/site-bare.git/hooks 
> > nano post-receive 
> > # add the following content until # end 
> > #!/bin/sh 
> > export GIT_WORK_TREE=/domains/site/test-workdir/. 
> > export GIT_DIR=/domains/git/site-bare.git/.git 
>
> ^^^ This. 
>
> The GIT_DIR environment variable tells Git where the "Git database 
> directory" is located. 
> But a bare Git repo *is* the Git database directory in itself. 
> That makes it different from a "normal" Git repository, in which the 
> root directory is the so-called work tree, and the Git database 
> directory is typically located beneath and called ".git". 
>
> Obviously, in a bare repo, there's no ".git" subdirectory. 
> Bare repos even typically have the ".git" suffix appended to their names 
> precisely to signify they already are ".git directories". 
>
> [...] 
>
> > git push web-remote master 
> > 
> > 
> > Once I also got the 
> [...] 
> > remote: fatal: Not a git repository: 
> > '/domains/git/site-bare.git/.git' 
>
> That most probably was the message a Git program run from your hook 
> script yelled at you.  Since you did not enable/provide proper error 
> reporting in your hook script, even though `git checkout` failed with 
> that error message, the script continued to chug along and hence the 
> receive operation succeeded. 
>
> [...] 
> > Later I did not get such "Not a git repository" error. 
>
> Did the hook run? 
> If you had no new commits to push, the hook was not run. 
>
> > But anyway, the workdir is not filled with content, this is my 
> > problem. 
> > 
> > UPDATE: If I do "git checkout -f" of the server, then the workdir is 
> > updated. So this means that the post-receive hook is not executed. 
> > 
> > Any idea why the remote workdir is not updated? 
>
> There are many issues with your approach. 
>
> The first one is that your GIT_DIR setting is incorrect (and outright 
> nonsensical) as I expained above.  But I'd say it is not needed at all: 
> when the hook runs, it already has all the Git-related settings in its 
> environment.  So you only has to provide it with the location of your 
> work tree. 
>
> The second problem is that the hook is supposed to fail (that is, to 
> exit with a non-zero exit code; supposedly having printed out an error 
> message to the standard error stream before doing that) as soon as it 
> encounters an error.  In your case I'd start with placing the line 
>
>   set -e -u 
>
> somewhere right after the shebang line (that #!/bin/sh thing).  This 
> would ask the shell to crash and burn as soon as any command it 
> executed failed (and that was not properly handled by the script) or 
> the script attempts to dereference a variable which was not assigned a 
> value. 
>
> I would also say that the correct event for the hook like yours is 
> post-update, not post-receive.  Receiving deals with, well, receiving, 
> while post-update means the heads (branches) were already updated with 
> their new commits. 
>
> And another pro-tip.  If you need to debug a script, running 
> non-interactively, a useful "trick" is to wrap it in another script, 
> something like this: 
>
>   #!/bin/sh 
>   set -e -u 
>   orig="`dirname '$0'`/post-update.orig" 
>   exec /bin/sh -x "$orig" $@ >/var/tmp/my-hook-trace.log 2>&1 
>
> Where your post-update.orig is the original script to debug, and the 
> script I showed is temporarily made the post-update hook. 
> The "-x" command-line option instructs the shell to trace the execution 
> of the script it's told to run, and that trace ends up in the log file 
> -- with all the diagnostic and error messages. 
>

-- 
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 push does not update remote workdir

2015-04-24 Thread Konstantin Khomoutov
On Fri, 24 Apr 2015 11:59:33 -0700 (PDT)
Konrád Lőrinczi  wrote:

[...]
> mkdir /domains/git/site-bare.git
> cd /domains/git/site-bare.git
> git --git-dir=. --work-tree=/domains/site/test-workdir/. init
> git config receive.denycurrentbranch ignore
> cd /domains/git/site-bare.git/hooks
> nano post-receive
> # add the following content until # end
> #!/bin/sh
> export GIT_WORK_TREE=/domains/site/test-workdir/.
> export GIT_DIR=/domains/git/site-bare.git/.git

^^^ This.

The GIT_DIR environment variable tells Git where the "Git database
directory" is located.
But a bare Git repo *is* the Git database directory in itself.
That makes it different from a "normal" Git repository, in which the
root directory is the so-called work tree, and the Git database
directory is typically located beneath and called ".git".

Obviously, in a bare repo, there's no ".git" subdirectory.
Bare repos even typically have the ".git" suffix appended to their names
precisely to signify they already are ".git directories".

[...]

> git push web-remote master
> 
> 
> Once I also got the 
[...]
> remote: fatal: Not a git repository:
> '/domains/git/site-bare.git/.git'

That most probably was the message a Git program run from your hook
script yelled at you.  Since you did not enable/provide proper error
reporting in your hook script, even though `git checkout` failed with
that error message, the script continued to chug along and hence the
receive operation succeeded.

[...]
> Later I did not get such "Not a git repository" error.

Did the hook run?
If you had no new commits to push, the hook was not run.

> But anyway, the workdir is not filled with content, this is my
> problem.
> 
> UPDATE: If I do "git checkout -f" of the server, then the workdir is 
> updated. So this means that the post-receive hook is not executed.
> 
> Any idea why the remote workdir is not updated?

There are many issues with your approach.

The first one is that your GIT_DIR setting is incorrect (and outright
nonsensical) as I expained above.  But I'd say it is not needed at all:
when the hook runs, it already has all the Git-related settings in its
environment.  So you only has to provide it with the location of your
work tree.

The second problem is that the hook is supposed to fail (that is, to
exit with a non-zero exit code; supposedly having printed out an error
message to the standard error stream before doing that) as soon as it
encounters an error.  In your case I'd start with placing the line

  set -e -u

somewhere right after the shebang line (that #!/bin/sh thing).  This
would ask the shell to crash and burn as soon as any command it
executed failed (and that was not properly handled by the script) or
the script attempts to dereference a variable which was not assigned a
value.

I would also say that the correct event for the hook like yours is
post-update, not post-receive.  Receiving deals with, well, receiving,
while post-update means the heads (branches) were already updated with
their new commits.

And another pro-tip.  If you need to debug a script, running
non-interactively, a useful "trick" is to wrap it in another script,
something like this:

  #!/bin/sh
  set -e -u
  orig="`dirname '$0'`/post-update.orig"
  exec /bin/sh -x "$orig" $@ >/var/tmp/my-hook-trace.log 2>&1

Where your post-update.orig is the original script to debug, and the
script I showed is temporarily made the post-update hook.
The "-x" command-line option instructs the shell to trace the execution
of the script it's told to run, and that trace ends up in the log file
-- with all the diagnostic and error messages.

-- 
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 push does not update remote workdir

2015-04-24 Thread Konrád Lőrinczi
I do execute the following steps to create on DEBIAN Server a
1) git bare repo; 
2) a working dir, where the files are copied after local git push;
3) a local clone on Windows, bare server repo is cloned.

I executed the following commands:

# SERVER: Setup git bare repo on server on Debian Wheezy v7.8, GIT 2.3.6
# mkdir /domains/site/test-workdir
# make a content copy on DEBIAN server into a test workdir
cp -rp /content/* /domains/site/test-workdir

mkdir /domains/git/site-bare.git
cd /domains/git/site-bare.git
git --git-dir=. --work-tree=/domains/site/test-workdir/. init
git config receive.denycurrentbranch ignore
cd /domains/git/site-bare.git/hooks
nano post-receive
# add the following content until # end
#!/bin/sh
export GIT_WORK_TREE=/domains/site/test-workdir/.
export GIT_DIR=/domains/git/site-bare.git/.git
cd $GIT_WORK_TREE
git checkout -f
# end
chmod +x post-receive
cd ..
git add .
git commit -m "Initial commit"
git status
# On branch master
# nothing to commit, working directory clean


# LOCAL:
cd /w/Dev/\!GIT/
mkdir test-remote
cd /w/Dev/\!GIT/test-remote
git init
git remote add web-local 
ssh://root@192.168.1.101/domains/git/site-bare.git
git remote -v
# web-local   ssh://root@192.168.1.101/domains/git/site-bare.git 
(fetch)
# web-local   ssh://root@192.168.1.101/domains/git/site-bare.git 
(push)
git pull web-local master


# SERVER
cd /domains/site/test-workdir/
rm -r *

# LOCAL (Windows7 64bit, git v2.3.6)
# git push should execute post receive on remote, so workdir should get 
again the content
git push web-remote master


Once I also got the 

Counting objects: 27, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (27/27), done.
Writing objects: 100% (27/27), 2.49 KiB | 0 bytes/s, done.
Total 27 (delta 21), reused 0 (delta 0)
remote: fatal: Not a git repository: '/domains/git/site-bare.git/.git'
To ssh://root@192.168.1.101/domains/git/site-bare.git
27b6ceb..8ed3301  master -> master


Later I did not get such "Not a git repository" error.
But anyway, the workdir is not filled with content, this is my problem.

UPDATE: If I do "git checkout -f" of the server, then the workdir is 
updated. So this means that the post-receive hook is not executed.

Any idea why the remote workdir is not updated?

-- 
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 Push Error(invalid old id sent)

2014-09-09 Thread Konstantin Khomoutov
On Fri, 5 Sep 2014 04:44:06 -0700 (PDT)
chethan jain  wrote:

> GIT Extensions:
> When we try to push into a feature branch we get the following error.
> ! [remote rejected] branch -> branch (invalid old id sent)
> error: failed to push some refs to server
> 
> It was working all fine, all of a sudden we see this error message.
> Can you please help?

>From the error message it appears [1], that you're using Gerrit on the
side you're pushing to.  Your problem has nothing to do with Git itself,
so please ask for help on Gerrit's support channels.

Or... Were that [2] you?

1. https://www.google.com/search?q="invalid+old+id+sent";
2. https://code.google.com/p/gerrit/issues/detail?id=2886

-- 
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 Push Error(invalid old id sent)

2014-09-09 Thread chethan jain


GIT Extensions:
When we try to push into a feature branch we get the following error.
! [remote rejected] branch -> branch (invalid old id sent)
error: failed to push some refs to server

It was working all fine, all of a sudden we see this error message.
Can you please help?

-- 
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 push heroku master help

2014-05-25 Thread Nelson Jimenez
 

After creating my rails project, pushing it into the GIT repo, was not able 
to push it to Heroku. When I run the command:

git push heroku master

I get this error:

ssh: connect to host heroku.com port 22: Bad file number
fatal: Could not read from remote repository.
Please make sure you have the correct access rightsand the repositiry exists.


Does anybody knows how to solve this problem?

-- 
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 push throws error

2013-02-26 Thread anugrith . v
Thanks a lot for that hint Konstantin. 

It was a basic issue and a human error.

Below entry was commented out in HTTP configuration file. So, it was not 
even asking the user name and it breaks. 
   *Require valid-user*

Thanks a lot once again...

On Tuesday, February 26, 2013 4:57:50 PM UTC+5:30, Konstantin Khomoutov 
wrote:
>
> On Mon, 25 Feb 2013 22:47:15 -0800 (PST) 
> anugr...@gmail.com  wrote: 
>
> [...] 
> > I am getting error while pushing the committed changes in GIT 
> > repository using LDAP authentication. 
> > [root@imsgit imstest_ldap]# git push 
> > * Couldn't find host 10.142.201.122 in the .netrc file; using defaults 
> > * About to connect() to 10.142.201.122 port 8080 (#0) 
> > *   Trying 10.142.201.122... * connected 
> > * Connected to 10.142.201.122 (10.142.201.122) port 8080 (#0) 
> > > GET /git/imstest_ldap.git/info/refs?service=git-receive-pack 
> > > HTTP/1.1 
> > User-Agent: git/1.8.1.3 
> > Host: 10.142.201.122:8080 
> > Accept: */* 
> > Accept-Encoding: gzip 
> > Pragma: no-cache 
> > 
> > * The requested URL returned error: 403 
> > * Closing connection #0 
> > error: The requested URL returned error: 403 while accessing 
> > 
> http://10.142.201.122:8080/git/imstest_ldap.git/info/refs?service=git-receive-pack
>  
> > fatal: HTTP request failed 
> > [root@imsgit imstest_ldap]# 
>
> Note that if authentication was really enabled on the server, you'd 
> receive "401 Unauthorized" and a header (or headers) listing available 
> authentication mechanisms. 
> Instead, the server just rejected the request with 403. 
>
> > HTTP logs are as below 
> > 
> > ==> error_log <== 
> > [Mon Feb 25 12:40:04 2013] [error] [client 10.142.201.122] Service 
> > not enabled: 'receive-pack' 
> > 
> > ==> access_log <== 
> > 10.142.201.122 - - [25/Feb/2013:12:40:04 +0530] "GET 
> > /git/imstest_ldap.git/info/refs?service=git-receive-pack HTTP/1.1" 
> > 403 - "-" "git/1.8.1.3" 
>
> As usually, I googled for the precise error message and towards the end 
> of [1] I read: 
>
>   If you see this in Apache's error_log: 
>
> Service not enabled: 'receive-pack' 
>
>   This means that $REMOTE_USER isn't set — that is, user-authentication 
>   failed. Git-http-backend needs the $REMOTE_USER to be set in order to 
>   record who did the PUSH. 
>
> 1. http://paperlined.org/apps/git/SmartHTTP_Ubuntu.html 
>

-- 
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] git push throws error

2013-02-26 Thread Konstantin Khomoutov
On Mon, 25 Feb 2013 22:47:15 -0800 (PST)
anugrit...@gmail.com wrote:

[...]
> I am getting error while pushing the committed changes in GIT
> repository using LDAP authentication. 
> [root@imsgit imstest_ldap]# git push
> * Couldn't find host 10.142.201.122 in the .netrc file; using defaults
> * About to connect() to 10.142.201.122 port 8080 (#0)
> *   Trying 10.142.201.122... * connected
> * Connected to 10.142.201.122 (10.142.201.122) port 8080 (#0)
> > GET /git/imstest_ldap.git/info/refs?service=git-receive-pack
> > HTTP/1.1
> User-Agent: git/1.8.1.3
> Host: 10.142.201.122:8080
> Accept: */*
> Accept-Encoding: gzip
> Pragma: no-cache
> 
> * The requested URL returned error: 403
> * Closing connection #0
> error: The requested URL returned error: 403 while accessing 
> http://10.142.201.122:8080/git/imstest_ldap.git/info/refs?service=git-receive-pack
> fatal: HTTP request failed
> [root@imsgit imstest_ldap]#

Note that if authentication was really enabled on the server, you'd
receive "401 Unauthorized" and a header (or headers) listing available
authentication mechanisms.
Instead, the server just rejected the request with 403.

> HTTP logs are as below
> 
> ==> error_log <==
> [Mon Feb 25 12:40:04 2013] [error] [client 10.142.201.122] Service
> not enabled: 'receive-pack'
> 
> ==> access_log <==
> 10.142.201.122 - - [25/Feb/2013:12:40:04 +0530] "GET 
> /git/imstest_ldap.git/info/refs?service=git-receive-pack HTTP/1.1"
> 403 - "-" "git/1.8.1.3"

As usually, I googled for the precise error message and towards the end
of [1] I read:

  If you see this in Apache's error_log:

Service not enabled: 'receive-pack'

  This means that $REMOTE_USER isn't set — that is, user-authentication
  failed. Git-http-backend needs the $REMOTE_USER to be set in order to
  record who did the PUSH. 

1. http://paperlined.org/apps/git/SmartHTTP_Ubuntu.html

-- 
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] git push throws error

2013-02-26 Thread anugrith . v
Hello,

I am getting error while pushing the committed changes in GIT repository 
using LDAP authentication. 

It was working fine earlier; but now even it does not ask  user name and 
password and simply fails. 

[root@imsgit imstest_ldap]# export GIT_CURL_VERBOSE=1
[root@imsgit imstest_ldap]# git status
# On branch master
nothing to commit, working directory clean
[root@imsgit imstest_ldap]# ls -l
total 4
-rw-r--r-- 1 root root 111 Feb 25 12:08 sysInfo.txt
[root@imsgit imstest_ldap]#

[root@imsgit imstest_ldap]# git push
* Couldn't find host 10.142.201.122 in the .netrc file; using defaults
* About to connect() to 10.142.201.122 port 8080 (#0)
*   Trying 10.142.201.122... * connected
* Connected to 10.142.201.122 (10.142.201.122) port 8080 (#0)
> GET /git/imstest_ldap.git/info/refs?service=git-receive-pack HTTP/1.1
User-Agent: git/1.8.1.3
Host: 10.142.201.122:8080
Accept: */*
Accept-Encoding: gzip
Pragma: no-cache

* The requested URL returned error: 403
* Closing connection #0
error: The requested URL returned error: 403 while accessing 
http://10.142.201.122:8080/git/imstest_ldap.git/info/refs?service=git-receive-pack
fatal: HTTP request failed
[root@imsgit imstest_ldap]#



HTTP logs are as below

==> error_log <==
[Mon Feb 25 12:40:04 2013] [error] [client 10.142.201.122] Service not 
enabled: 'receive-pack'

==> access_log <==
10.142.201.122 - - [25/Feb/2013:12:40:04 +0530] "GET 
/git/imstest_ldap.git/info/refs?service=git-receive-pack HTTP/1.1" 403 - 
"-" "git/1.8.1.3"



Your help on this would be highly appreciated. 

Thanks in advance.

-- 
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] "git push" throws error

2013-02-26 Thread anugrith . v
Hello,

This is the apache configuration file for GIT repositories. 

[root@imsgit httpd]# cat /etc/httpd/conf.d/git.conf


   ServerName imsgit.apac.nsn-net.net
   DocumentRoot /imsgit/Repositories

   SetEnv GIT_PROJECT_ROOT /imsgit/Repositories
   SetEnv GIT_HTTP_EXPORT_ALL
   ScriptAlias /git/ /usr/local/libexec/git-core/git-http-backend/


   
   AuthType Basic
   AuthName "GIT repository"
   AuthUserFile /imsgit/conf/users-imstest_1
   Require valid-user
   

   
   AuthType Basic
   AuthName "Git Authentication; User LDAP login and pwd"
   AuthBasicProvider ldap
   AuthzLDAPAuthoritative off
   AuthLDAPURL "<>"
   AuthLDAPBindDN "<>"
   AuthLDAPBindPassword "<>"
   




For first repository "/git/imstest_1" which is using local http user 
authentication, "git push" works fine and below is http logs

10.142.201.122 - - [25/Feb/2013:12:40:58 +0530] "GET 
/git/imstest_1/info/refs?service=git-receive-pack HTTP/1.1" 401 484 "-" 
"git/1.8.1.3"
10.142.201.122 - - [25/Feb/2013:12:41:03 +0530] "GET 
/git/imstest_1/info/refs?service=git-receive-pack HTTP/1.1" 401 484 "-" 
"git/1.8.1.3"
10.142.201.122 - anugrith [25/Feb/2013:12:41:03 +0530] "GET 
/git/imstest_1/info/refs?service=git-receive-pack HTTP/1.1" 200 306 "-" 
"git/1.8.1.3"
10.142.201.122 - anugrith [25/Feb/2013:12:41:03 +0530] "POST 
/git/imstest_1/git-receive-pack HTTP/1.1" 200 52 "-" "git/1.8.1.3"


But for second repo with LDAP authentication, it gives error. This was 
working fine earlier without any configuration changes.
===It does not even ask the user name!===

[root@imsgit imstest_ldap]# export GIT_CURL_VERBOSE=1
[root@imsgit imstest_ldap]# git status
# On branch master
nothing to commit, working directory clean
[root@imsgit imstest_ldap]# ls -l
total 4
-rw-r--r-- 1 root root 111 Feb 25 12:08 sysInfo.txt
[root@imsgit imstest_ldap]#

[root@imsgit imstest_ldap]# git push
* Couldn't find host 10.142.201.122 in the .netrc file; using defaults
* About to connect() to 10.142.201.122 port 8080 (#0)
*   Trying 10.142.201.122... * connected
* Connected to 10.142.201.122 (10.142.201.122) port 8080 (#0)
> GET /git/imstest_ldap.git/info/refs?service=git-receive-pack HTTP/1.1
User-Agent: git/1.8.1.3
Host: 10.142.201.122:8080
Accept: */*
Accept-Encoding: gzip
Pragma: no-cache

* The requested URL returned error: 403
* Closing connection #0
error: The requested URL returned error: 403 while accessing 
http://10.142.201.122:8080/git/imstest_ldap.git/info/refs?service=git-receive-pack
fatal: HTTP request failed
[root@imsgit imstest_ldap]#



HTTP logs are as below

==> error_log <==
[Mon Feb 25 12:40:04 2013] [error] [client 10.142.201.122] Service not 
enabled: 'receive-pack'

==> access_log <==
10.142.201.122 - - [25/Feb/2013:12:40:04 +0530] "GET 
/git/imstest_ldap.git/info/refs?service=git-receive-pack HTTP/1.1" 403 - 
"-" "git/1.8.1.3"



Your help on this would be highly appreciated. 

Thanks in advance.


























imstest_1/:
total 32
drwxr-xr-x  2 apache apache 4096 Jan 21 15:58 branches
-rw-r--r--  1 root   root 66 Feb  5 12:16 config
-rw-r--r--  1 apache apache   73 Jan 21 15:58 description
-rw-r--r--  1 apache apache   23 Jan 21 15:58 HEAD
drwxr-xr-x  2 apache apache 4096 Jan 21 16:00 hooks
drwxr-xr-x  2 apache apache 4096 Feb 25 12:41 info
drwxr-xr-x 98 apache apache 4096 Feb 25 12:41 objects
drwxr-xr-x  4 apache apache 4096 Jan 21 15:58 refs

imstest_1/branches:
total 0

imstest_1/hooks:
total 36
-rwxr-xr-x 1 apache apache  452 Jan 21 15:58 applypatch-msg.sample
-rwxr-xr-x 1 apache apache  896 Jan 21 15:58 commit-msg.sample
-rwxr-xr-x 1 apache apache  189 Jan 21 15:58 post-update
-rwxr-xr-x 1 apache apache  398 Jan 21 15:58 pre-applypatch.sample
-rwxr-xr-x 1 apache apache 1704 Jan 21 15:58 pre-commit.sample
-rwxr-xr-x 1 apache apache 1239 Jan 21 15:58 prepare-commit-msg.sample
-rwxr-xr-x 1 apache apache 4951 Jan 21 15:58 pre-rebase.sample
-rwxr-xr-x 1 apache apache 3611 Jan 21 15:58 update.sample

imstest_1/info:
total 8
-rw-r--r-- 1 apache apache 240 Jan 21 15:58 exclude
-rw-r--r-- 1 apache apache 307 Feb 25 12:41 refs

imstest_1/objects:
total 384
drwxr-xr-x 2 apache apache 4096 Jan 21 18:25 00
drwxr-xr-x 2 apache apache 4096 Jan 21 18:04 05
drwxr-xr-x 2 apache apache 4096 Feb 25 12:41 07
drwxr-xr-x 2 apache apache 4096 Feb  7 11:22 0d
drwxr-xr-x 2 apache apache 4096 Jan 21 16:55 11
drwxr-xr-x 2 apache apache 4096 Feb  5 12:23 13
drwxr-xr-x 2 apache apache 4096 Feb  4 12:33 14
drwxr-xr-x 2 apache apache 4096 Feb  5 12:39 18
drwxr-xr-x 2 apache apache 4096 Feb  5 12:39 19
drwxr-xr-x 2 apache apache 4096 Feb 25 12:41 1a
drwxr-xr-x 2 apache apache 4096 Jan 31 16:38 1b
drwxr-xr-x 2 apache apache 4096 Feb 21 12:59 1d
drwxr-xr-x 2 apache apache 4096 Jan 30 17:30 1e
drwxr-xr-x 2 apache apache 4096 Feb 21 12:59 1f


imstest_1/objects/00:
total 4
-r--r--r-- 1 apache apache 131 Jan 21 18:25 
ce5f01c3e2e5d8b9b970aed170418563e37932

imstest_1/objects/05:
total 4
-r--r--r-- 1 apache apache 155 Ja

[git-users] "git push" fails. It does not ask user name and password

2013-02-26 Thread anugrith . v

Below is the HTTP configuration for the GIT repositories. 

[root@imsgit httpd]# cat /etc/httpd/conf.d/git.conf


   ServerName imsgit.apac.nsn-net.net
   DocumentRoot /imsgit/Repositories

   SetEnv GIT_PROJECT_ROOT /imsgit/Repositories
   SetEnv GIT_HTTP_EXPORT_ALL
   ScriptAlias /git/ /usr/local/libexec/git-core/git-http-backend/


   
   AuthType Basic
   AuthName "GIT repository"
   AuthUserFile /imsgit/conf/users-imstest_1
   Require valid-user
   

   
   AuthType Basic
   AuthName "Git Authentication; User LDAP login and pwd"
   AuthBasicProvider ldap
   AuthzLDAPAuthoritative off
   AuthLDAPURL "<>"
   AuthLDAPBindDN "<>"
   AuthLDAPBindPassword "<>"
   




For first repository "/git/imstest_1" which is using local http user 
authentication, "git push" works fine and below is http logs

10.142.201.122 - - [25/Feb/2013:12:40:58 +0530] "GET 
/git/imstest_1/info/refs?service=git-receive-pack HTTP/1.1" 401 484 "-" 
"git/1.8.1.3"
10.142.201.122 - - [25/Feb/2013:12:41:03 +0530] "GET 
/git/imstest_1/info/refs?service=git-receive-pack HTTP/1.1" 401 484 "-" 
"git/1.8.1.3"
10.142.201.122 - anugrith [25/Feb/2013:12:41:03 +0530] "GET 
/git/imstest_1/info/refs?service=git-receive-pack HTTP/1.1" 200 306 "-" 
"git/1.8.1.3"
10.142.201.122 - anugrith [25/Feb/2013:12:41:03 +0530] "POST 
/git/imstest_1/git-receive-pack HTTP/1.1" 200 52 "-" "git/1.8.1.3"


But for second repo with LDAP authentication, it gives error. This was 
working fine earlier without any configuration changes.
===It does not even ask the user name!===

[root@imsgit imstest_ldap]# export GIT_CURL_VERBOSE=1
[root@imsgit imstest_ldap]# git status
# On branch master
nothing to commit, working directory clean
[root@imsgit imstest_ldap]# ls -l
total 4
-rw-r--r-- 1 root root 111 Feb 25 12:08 sysInfo.txt
[root@imsgit imstest_ldap]#

[root@imsgit imstest_ldap]# git push
* Couldn't find host 10.142.201.122 in the .netrc file; using defaults
* About to connect() to 10.142.201.122 port 8080 (#0)
*   Trying 10.142.201.122... * connected
* Connected to 10.142.201.122 (10.142.201.122) port 8080 (#0)
> GET /git/imstest_ldap.git/info/refs?service=git-receive-pack HTTP/1.1
User-Agent: git/1.8.1.3
Host: 10.142.201.122:8080
Accept: */*
Accept-Encoding: gzip
Pragma: no-cache

* The requested URL returned error: 403
* Closing connection #0
error: The requested URL returned error: 403 while accessing 
http://10.142.201.122:8080/git/imstest_ldap.git/info/refs?service=git-receive-pack
fatal: HTTP request failed
[root@imsgit imstest_ldap]#



HTTP logs are as below

==> error_log <==
[Mon Feb 25 12:40:04 2013] [error] [client 10.142.201.122] Service not 
enabled: 'receive-pack'

==> access_log <==
10.142.201.122 - - [25/Feb/2013:12:40:04 +0530] "GET 
/git/imstest_ldap.git/info/refs?service=git-receive-pack HTTP/1.1" 403 - 
"-" "git/1.8.1.3"



Your help on this would be highly appreciated. 

Thanks in advance.


-- 
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] git push failing with change closed

2013-01-19 Thread python . prog29
I am trying to push a change to a remote server and running into "change 
closed "error,thats because the change-id am
trying to push is same as an earlier change that was already pushed(dont 
know why its same),I trid to generate a new commit
message using the .git/hook,it generates a new commit-msg but my change-id 
is still the same and I cant push still,
any inputs on why a new change-id is not being generated?

git push 
ssh://repo.company.com:29418/platform/vendor/com-proprietary/radio 
HEAD:refs/for/master
Counting objects: 1852, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (688/688), done.
Writing objects: 100% (809/809), 1.37 MiB, done.
Total 809 (delta 678), reused 177 (delta 95)
remote: Resolving deltas: 100% (678/678)
remote: Processing changes: refs: 1, done
To 
ssh://usern...@repo.company.com:29418/platform/vendor/com-proprietary/radio
 ! [remote rejected] HEAD -> refs/for/master (change 219386 closed)
error: failed to push some refs to 

'ssh://usern...@repo.company.com:29418/platform/vendor/com-proprietary/radio'

Tried to generate a change id using below

cd .git/hooks
scp -p -P 29418 usern...@repo.company.com:hooks/commit-msg .
cd ../..

-- 




[git-users] Git push logs

2013-01-17 Thread Huu Da Tran
Hi all,

I'm having trouble with the git process.

We got a origin/master where only i can write to. I got programmers pulling 
from that, and pushing to their own repo where I can pull the changes, 
merge and push to origin.

Is there a way for me to know when they actually pushed to their repos?

My problem is the following timeline:

 - Time 1: everyone pull from origin/master.
 - TIme 2: programmer1 makes changes and commit to local repo.
 - Time 3: programmer1 push to p1repo.
 - Time 4: programmer1 makes changes and commit to local repo.
 - Time 5: I pull p1repo
 - Time 6: programmer1 push to p1repo.
 - Time 7: I makes changes and push to origin/master
 - Time 7...50: I don't need anything from programmer1.
 - Time 51: programmer1 makes changes and commit to local repo.
 - Time 52: programmer1 push to p1repo.
 - Time 53: I pull p1repo.

Code changes at Time7, affects code change made at Time4.

How would you guy trace back this scenario.  When I use "git blame", i see 
that the programmer made the changes before me (time4 vs time7), but that 
change was not available at time5 when i pulled.

Thanks.

-- 




[git-users] git push

2013-01-07 Thread k-joseph
Hi every one, am kindly requesting for your assistance, i successfully push 
to a remote branch on my account for the first time( first push where i use 
git push origin ) but when am pushing the second or any 
other time except the first i normally get an error  
$ git push
Enter passphrase for key '/c/Users/kaweesi joseph/.ssh/id_rsa':
error: src refspec refs/heads/TRUNK-3814:g...@github.com does not match any.
error: failed to push some refs to 
'g...@github.com:k-joseph/openmrs-core.git'
i have also tried using git push --all and i get
$ git push --all
Enter passphrase for key '/c/Users/kaweesi joseph/.ssh/id_rsa':
Counting objects: 249, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (79/79), done.
Writing objects: 100% (139/139), 24.36 KiB, done.
Total 139 (delta 72), reused 99 (delta 45)
To g...@github.com:k-joseph/openmrs-core.git
   9b76cd3..9e4ba80  TRUNK-3814 -> TRUNK-3814
 * [new branch]  TRUNK-2449 -> TRUNK-2449
 * [new branch]  testing -> testing
 ! [rejected]master -> master (non-fast-forward)
error: failed to push some refs to 
'g...@github.com:k-joseph/openmrs-core.git'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and merge the remote changes
hint: (e.g. 'git pull') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

So i have always been deleting the remote branch in order to succeed in 
pushing my changes to a remote branch, i fill this is not the best way to 
do this
Please help me with a git command that i can use to push to a remote branch 
the second, third or even more time without first deleting the remote 
branch, thanks all


-- 




[git-users] git push origin :TRUNK-3814

2012-12-19 Thread k-joseph
Hi, every one, i have just began using using git and do request for your 
assistance, i want to delete a remote branch, i have already deleted it 
locally, but am getting an error , and the branch still exisits on my 
github account: this is the error: 
$ git push origin :TRUNK-3814
Enter passphrase for key '/c/Users/kaweesi joseph/.ssh/id_rsa':
remote: error: refusing to delete the current branch: refs/heads/TRUNK-3814
To g...@github.com:k-joseph/openmrs-core.git
 ! [remote rejected] TRUNK-3814 (deletion of the current branch prohibited)
error: failed to push some refs to 
'g...@github.com:k-joseph/openmrs-core.git'

please i humbly request for all your assistance 

-- 




Re: [git-users] git push stopped on windows

2012-12-07 Thread Konstantin Khomoutov
On Fri, 7 Dec 2012 01:19:09 -0800 (PST)
jxck  wrote:

[...]
> > > but, I can't push from windows. 
[...]
> > http://thread.gmane.org/gmane.comp.version-control.git.user/3757/focus=3762 
> oh It seems I need to use older version.

No, it means you'd better off using another method for pushing, such as
SSH or HTTP[S].  Using an older version is indeed an option, but it's
sweeping a problem under the rug -- eventually you might be in need to
upgrade anyway.

-- 




Re: [git-users] git push stopped on windows

2012-12-07 Thread jxck
> 
http://thread.gmane.org/gmane.comp.version-control.git.user/3757/focus=3762 

oh It seems I need to use older version.

thanks !

On Friday, December 7, 2012 4:55:39 PM UTC+9, Konstantin Khomoutov wrote:
>
> On Thu, Dec 06, 2012 at 10:03:22PM -0800, jxck wrote: 
>
> > I'm using git server on ubuntu. 
> > When I need to share my code, running daemon 
> > by using git-daemon like this. 
> [...] 
> > but, I can't push from windows. 
> > 
> > $ git clone git://ipaddr/git/reponame  // ok 
> > $ git pull origin master  // ok 
> > 
> > $ git push origin master  // NG 
> > Counting objects: 6, done.   
> > Delta compression using up to 4 threads.   
> > Compressing objects: 100% (2/2), done.   
> > Writing objects: 100% (6/6) 
> > // stop here forever ... 
>
> http://thread.gmane.org/gmane.comp.version-control.git.user/3757/focus=3762 
>
>

-- 




Re: [git-users] git push stopped on windows

2012-12-06 Thread Konstantin Khomoutov
On Thu, Dec 06, 2012 at 10:03:22PM -0800, jxck wrote:

> I'm using git server on ubuntu.
> When I need to share my code, running daemon
> by using git-daemon like this.
[...]
> but, I can't push from windows.
> 
> $ git clone git://ipaddr/git/reponame  // ok
> $ git pull origin master  // ok
> 
> $ git push origin master  // NG
> Counting objects: 6, done.  
> Delta compression using up to 4 threads.  
> Compressing objects: 100% (2/2), done.  
> Writing objects: 100% (6/6) 
> // stop here forever ...

http://thread.gmane.org/gmane.comp.version-control.git.user/3757/focus=3762

-- 




[git-users] git push stopped on windows

2012-12-06 Thread jxck
Hi guys.

I'm using git server on ubuntu.
When I need to share my code, running daemon
by using git-daemon like this.

$ git daemon --verbose --export-all --enable=receive-pack --base-path=./

I can push/pull to this repo from another ubuntu running
on windows(vmware player).

$ git clone git://ipaddr/git/reponame  // ok
$ git pull origin master  // ok
$ git push origin master  // ok


but, I can't push from windows.

$ git clone git://ipaddr/git/reponame  // ok
$ git pull origin master  // ok

$ git push origin master  // NG
Counting objects: 6, done.  
Delta compression using up to 4 threads.  
Compressing objects: 100% (2/2), done.  
Writing objects: 100% (6/6) 
// stop here forever ...

git versions
server: 1.7.9.5
win7:   1.8.0 (shell of github for win)

what is difference between win client & ubuntu client?

thanks

-- 




Re: [git-users] git push problem (Windows)

2012-11-14 Thread Konstantin Khomoutov
On Wed, 14 Nov 2012 00:04:29 -0800 (PST)
Sergey Ovchinnikov  wrote:

> Hello, I had a problem. Hang when trying to do 'git push'.
[...]
> git init --bare C:/Repo/egg.git
> git daemon --verbose --enable=receive-pack --base-path=C:/Repo
> --export-all C:/Repo/egg.git --detach --syslog
[...]
> In what could be the problem?

I suppose this is a known [1] problem [2].

Note that is you want to discuss this problems further, please do this
on the msysgit mailing list [3], not here.

1. http://code.google.com/p/msysgit/issues/detail?id=457
2. http://www.google.com/search?q=git+push+hangs+in+msysgit
3. http://groups.google.com/group/msysgit

-- 




Re: [git-users] git push problem (Windows)

2012-11-14 Thread Konstantin Khomoutov
On Wed, 14 Nov 2012 01:37:31 -0800 (PST)
Thomas Ferris Nicolaisen  wrote:

> Git daemon only serves read operations. You can't push to it, only
> fetch or pull.
That is incorrect: the "--enable=receive-pack" command-line options
precisely enables the service which allows *anonymous* pushes.
This is very wrong in most cases (except for may be automated pushes
happening in a controlled environment) but possible to enable.

-- 




[git-users] git push problem (Windows)

2012-11-14 Thread Thomas Ferris Nicolaisen
Git daemon only serves read operations. You can't push to it, only fetch or 
pull.

-- 




[git-users] git push problem (Windows)

2012-11-14 Thread Sergey Ovchinnikov
Hello, I had a problem. Hang when trying to do 'git push'.

The following sequence of actions.


git init --bare C:/Repo/egg.git

git daemon --verbose --enable=receive-pack --base-path=C:/Repo --export-all 
C:/Repo/egg.git --detach --syslog

In another folder:
git clone git://localhost/egg.git

ok.

Making changes:

touch readme.txt
git add readme.txt
git commit -m "first commit"

git push
...
In another folder 

demon console log:
[2236] Connection from 127.0.0.1:3044
[2236] Extended attributes (16 bytes) exist 
[2236] Request receive-pack for '/egg.git'

In what could be the problem?

-- 




[git-users] git push over cntlm

2012-08-01 Thread MohanR
Hi,
  I am able to clone successfully through cntlm. But when I try to 
issue 'git push origin master' I get

HEAD: HTTP/1.1 401 Authorization Required

Mine is a NTLM proxy. Is it possible to push over HTTP ? 


Thanks,
Mohan

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/git-users/-/Q1Fu_Qoc6PkJ.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] git push fine, git pull not seeing changed

2012-07-06 Thread Konstantin Khomoutov
On Fri, 6 Jul 2012 01:40:56 -0700 (PDT)
Avner Tamir  wrote:

> we are facing a strange problems:
> when we push to remote repo code is pushed successfully and we do see
> the commits and code being pushed via gitweb.
> when we try to pull from remote repo, we are getting a message "all
> up to date" but we do not see new code.
> to make things more interesting we do see on client machine that HEAD
> is pointing to the right commit.
> we are using http, our repo is on apache (httpd), OS is RHEL 5.7
Isn't this a standard problem with not running an appropriate hook
after pushing?  See the "My HTTP repository has updates, which git clone
misses. What happened?" question in the FAQ [1].

1. https://git.wiki.kernel.org/index.php/GitFaq

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



[git-users] git push fine, git pull not seeing changed

2012-07-06 Thread Avner Tamir
Hi,

we are facing a strange problems:
when we push to remote repo code is pushed successfully and we do see the 
commits and code being pushed via gitweb.
when we try to pull from remote repo, we are getting a message "all up to 
date" but we do not see new code.
to make things more interesting we do see on client machine that HEAD is 
pointing to the right commit.
we are using http, our repo is on apache (httpd), OS is RHEL 5.7

Thanks in advance,
Avner Tamir  

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/git-users/-/Lod7dmxLsfAJ.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



[git-users] git push says "Everything up-to-date"

2012-07-03 Thread Kersten Broich
 

I am having trouble understanding the concept of git local and remote 
versioning. For example I have a iPhone app in a local git rep. Initally 
this was my master branch.

I then checked out a new branch git checkout -b "update-2.0.1". 

Then I set git push origin update-2.0.1 to ensure that I have a seperate 
branch for developing this app update and when done merge it back into my 
master branch. Fine!

Now that I am on my update-branch I want to create branches for every issue 
ID. So I say git checkout -b "#3178" - when I now try to push this new 
issue-branch in my remote repository git says "Everything-up-to-date". 

I don't see why it is not possible to push this issue branch to the remote 
repository?

git remote -b returns 

origin/master 

origin/update-2.0.1

I would love to see a third branch

origin/update-2.0.1/#3178

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/git-users/-/KETcTKlnpfQJ.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] GIT push over HTTP

2011-08-31 Thread Konstantin Khomoutov
On Wed, 31 Aug 2011 03:18:12 -0700 (PDT)
MohanR  wrote:

> I am using cntlm to cross my NTLM proxy and it works very well
> for 'git clone'. When I try to push though I get this error. Even in
> this case the cntlm proxy works. After I enter the username everything
> hangs.
[...]
> * The requested URL returned error: 401
> * Closing connection #0
> Username: mohanr
I'm not sure I understood the question, but 401 means "authorization
required", so strictly speaking it's not an error, it's just the server
telling you that push cannot be done anonymously (contrary to cloning).
If so, does using the URL like
http://user:pass@server/some/path.git
work for you?

Does [1] help?

1. 
http://stackoverflow.com/questions/5093558/using-github-behind-a-firewall-without-ssh-access/5093726#5093726

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



[git-users] GIT push over HTTP

2011-08-31 Thread MohanR
Hi,
This might be the most basic of questions.

I am using cntlm to cross my NTLM proxy and it works very well
for 'git clone'. When I try to push though I get this error. Even in
this case the cntlm proxy works. After I enter the username everything
hangs.

Are there any references to this in the document ?


Thanks,
Mohan



$ GIT_CURL_VERBOSE=1 GIT_TRACE=2 git push http://github.com/mohanr/JSE-7-C
oncurrency.git origin master
setup: git_dir: .git
setup: worktree: /home/mohanr/JSE-7-Concurrency
setup: cwd: /home/mohanr/JSE-7-Concurrency
setup: prefix: (null)
trace: built-in: git 'push' 'http://github.com/mohanr/JSE-7-
Concurrency.git' 'origin' 'master'
trace: run_command: 'git-remote-http' 'http://github.com/mohanr/JSE-7-
Concurrency.git' 'http://github.com/m
* Couldn't find host github.com in the .netrc file; using defaults
* About to connect() to proxy 127.0.0.1 port 3128 (#0)
*   Trying 127.0.0.1... * connected
* Connected to 127.0.0.1 (127.0.0.1) port 3128 (#0)
> GET 
> http://github.com/mohanr/JSE-7-Concurrency.git/info/refs?service=git-receive-pack
>  HTTP/1.1
User-Agent: git/1.7.4
Host: github.com
Accept: */*
Proxy-Connection: Keep-Alive
Pragma: no-cache

* The requested URL returned error: 401
* Closing connection #0
Username: mohanr

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



[git-users] Git push error

2010-10-27 Thread Prashant Shirbhate
Hello
While pusing my filed to  my your public repository i got below error.

Please suggest for the same


C:\private\prashant>git push
To c:\lmg_test\public_prashant.git
 ! [rejected]master -> master (non-fast-forward)
error: failed to push some refs to 'c:\lmg_test\public_prashant.git'
To prevent you from losing history, non-fast-forward updates were
rejected
Merge the remote changes before pushing again.  See the 'Note about
fast-forwards' section of 'git push --help' for details.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



[git-users] git push to different branches

2010-07-28 Thread joe
When going through several articles/tutorials about git I see the
following being done for the initial push to a new branch:

git push origin branchname:refs/heads/branchname

Is this necessary for subsequent pushes or does "git push" do the same
thing?  I just tested this with a couple of dummy repo's and it seems
to do the same thing.  I've actually been doing this each time I need
to add/push something new to branches that aren't touched by
developers:

** add files **
git add .
git commit -am "added foo"
git push origin branchname:refs/heads/branchname

** checkout branch that is worked on and pull new data from branchname
**
git checkout devbranch
git pull . branchname
git push origin devbranch:refs/heads/devbranch

So, if anyone could clarify this for me that would be awesome :)

Regards,

Joe

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



[git-users] git push

2010-03-02 Thread Marcin Krol

Hello everyone,

I'm a new user of git, trying to push to remote repo with working copy 
attached to it. I DO want the remote files to be overwritten. According 
to FAQ


http://git.wiki.kernel.org/index.php/GitFaq#push-is-reverse-of-fetch

http://thread.gmane.org/gmane.comp.version-control.git/42506/focus=42685

I configured:

remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
remote.origin.url=r...@remote:/var/www/html/.git
remote.origin.push=refs/heads/*:refs/remotes/B/*
branch.master.remote=origin


Then I do 'git push' on local machine:

Counting objects: 5, done.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 286 bytes, done.
Total 3 (delta 2), reused 0 (delta 0)
To r...@remote:/var/www/html/.git
   2f800b1..d709d6d  master -> B/master

OK for now.

But then according to the FAQ I do on the 'remote':

# git merge remotes/B/master

Updating 2f800b1..d709d6d
error: Entry 'hostdeleted.mako' would be overwritten by merge. Cannot merge.

That should do it according to FAQ but doesn't.

Overwriting the file local to 'remote', both in .git repo and in the 
filesystem is precisely what I want!


Anybody knows how to make git to merge the changes (obviously not if 
there are conflicts)?


Regards,
mk

--
You received this message because you are subscribed to the Google Groups "Git for 
human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



[git-users] git push

2010-03-02 Thread Marcin Krol

Hello everyone,

Fixed, I have had uncommitted local change on server ('remote').

Regards,
mk

--
You received this message because you are subscribed to the Google Groups "Git for 
human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



[git-users] Git push remote state

2009-05-10 Thread tome

Hi all,

I'm cutting my teeth with git and have a strange issue.  I have git
set up on my hosting account, created a clone on my local system.  I
add a file, abc.txt, on my local system, commit on master and push.  I
expect to see abc.txt on my hosting account, don't get any errors
during push.  Check filesystem on hosting account but the added file
is not there.  SSH to hosting account do a $git status and get this:

# On branch master
# Changes to be committed:
#   (use "git reset HEAD ..." to unstage)
#
#   deleted:abc.txt
#

why is added file showing as deleted, am I missing something here??

Thanks
T
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en
-~--~~~~--~~--~--~---