[git-users] how to set proxy?

2013-09-11 Thread Olaf Zaplinski
Hi,

I am using git behind a corporate proxy, so I had set the proxy variable in 
.gitconfig. But git still fails:

 npm http 304 https://registry.npmjs.org/assert

 npm http 304 https://registry.npmjs.org/path

 npm http 304 https://registry.npmjs.org/domino

 npm WARN package.json assert@0.4.9 No readme data.

 npm WARN package.json path@0.4.9 No readme data.

 npm ERR! git clone git://github.com/aredridel/html5.git Cloning into bare 
 repository 
 '/home/svc-applic/.npm/_git-remotes/git-github-com-aredridel-html5-git-98f4a4cf'...

 npm ERR! git clone git://github.com/aredridel/html5.git

 npm ERR! git clone git://github.com/aredridel/html5.git fatal: unable to 
 connect to github.com:

 npm ERR! git clone git://github.com/aredridel/html5.git github.com[0: 
 192.30.252.131]: errno=Connection timed out




-- 
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] How tell git-bush which new private key to use

2013-09-11 Thread berd


Hi,

 we use git gui with git bash, version:

git-gui version 0.17.GITGUI

git- version 1.8.3.msysgit0

 

on Win7 64-bit

 

Now to testing we created new ssh key, but to working, we use other ssh key.

For me is the question, how can I tell git-bash to take the new ssh key?

 

Additional.

My git-bash has his home folder in the network order: g:\.ssh but my 
working folder is 
c:/xampp/htdocs/workspace_aptana/repositoris/mygit1/git1-static

 

I have found follow link:

 

http://serverfault.com/questions/194567/how-to-i-tell-git-for-windows-where-to-find-my-private-rsa-key

 

and from a friend:

 

http://superuser.com/questions/232373/tell-git-which-private-key-to-use

 but both do not work quite.

 

Does anyone have an idea?

Thanks in advance.

 

Regards

berd

-- 
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] How tell git-bush which new private key to use

2013-09-11 Thread Konstantin Khomoutov
On Wed, 11 Sep 2013 05:03:27 -0700 (PDT)
berd bersc...@googlemail.com wrote:

[...]
 Now to testing we created new ssh key, but to working, we use other
 ssh key.
 
 For me is the question, how can I tell git-bash to take the new ssh
 key?
[...]

Do you have to keep the test key or you just want to *replace* it with
the production key?  If replacement is needed, then just overwrite the
id_rsa and id_rsa.pub files in your %HOME%\.ssh folder with the new
ones (they might also be named id_dsa[.pub], and the .pub file (the
public part of the key) is not strictly needed -- it can always be
regenerated from the private key, and it does not participarte in
authentication).

If you want to have both keys, continue reading.

 http://superuser.com/questions/232373/tell-git-which-private-key-to-use
 
  but both do not work quite.
[...]

The solution at the quoted link is the correct one for your case.
How exactly did it not work out?

Did you try to log in via plain SSH client and not make Git call it for
you? -- this is the first thing to try when debugging.

Open Git bash and run something like

ssh -T user@host git --version

there and see if it a) succeeds, and b) prints of the version of Git
running on the remote system.

If it fails to log in, try to pass one or more -v options to ssh --
the more you pass the more chattier it becomes, -- so try

ssh -T -vvv user@host git --version

Does this printout mention SSH reading the correct key file?  Does it
tell anything about failure to locate or read or parse it?


Yet another approach to the problem is to switch to using the so-called
SSH key agent -- this is a program which sits in memory permanently,
and maintains decrypted private keys, which you submit to it exactly
once, and when an SSH client tries to authenticate to the server using
a private key it first tries to find and contact the key agent, and if
it succeeds, asks the agent for the keys it has, and tries to use them.

Stock Git for Windows includes a port of OpenSSH client, and so it
includes the ssh-agent.exe binary.  You can use it like this:

1) Start Git bash.

2) Run

   eval $(ssh-agent -s)

   which would a) place the agent into memory, and b) equip *this
   session* of Git bash with the necessary knowledge about how to reach
   the agent.

3) Run

   ssh-add /path/to/your/private/key/file

   several times for each of your keys, entering the passphrase for
   each.

4) Next time you run ssh it will try to contact the agent and get keys
   from it.

5) Before closing Git bash, run

   kill $SSH_AGENT_PID

   to shut down the running agent.
   If you won't do this and will just close the Git bash, the agent will
   remain in memory, and the next Git bash shell *won't* reuse it.
   On the other hand, having it in memory won't hurt other than
   occupying it -- you could kill it any time using Task Manager.

You might customize this sort of setup by tweaking various per-user
bash configuration files -- it could achieve running the agent at
opening Git bash and killing it when Git bash closes.  Personally,
I don't have a ready to offer knowledge of how to do this, but it's
doable.

Another approach with the key agent is to switch to using PuTTY [1]
instead of using the OpenSSH agent shipped with Git for Windows.
PuTTY's advantage is that it's better integrated into the system, and
its key manager (pageant.exe) comes in a form of a GUI app which sits
in the system notification area (the tray).

To use putty, you'll have to permanentry set the environment variable
GIT_SSH (on a system or user level) to something like
%ProgramFiles%\PuTTY \plink.exe

Note that TortoiseSVN and TortoiseGit come with their own patched
version of plink.exe which is able to ask mandatory quesions using a
GUI dialog.  So if you have one/want to use it, you could set your
GIT_SSH to something like
%ProgramFiles%\TortoiseSVN\bin\TortoisePlink.exe
Note though that TortoiseFoos do not include the full stack of PuTTY
utilities, so you have to install it anyway to use its key agent.

A complete step-by-step guide (with pictures galore) on how to set up
Git for Windows to work with PuTTY including using the key agent is [2].

1. http://www.chiark.greenend.org.uk/~sgtatham/putty/
2. http://nathanj.github.io/gitguide/index.html

P.S.
For the future, please note that it's futile to ask for help while
provifing zero information about how the faulty program actually fails
-- did not quite work is not the statement of a 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/groups/opt_out.


[git-users] renaming or aliasing commits

2013-09-11 Thread Rich Naylor
im using git to allow users in a training class to update there development 
space to reflect the chapter/module that they are in. so, the user starts 
the class by cloning a repo, then uses 'git checkout -f ' to update 
themselves for each chapter/module. Does anyone know how i can rename/alias 
the commits to something more humanly readable. Currently they would type 
or copy/paste something similar to this:

git checkout -f 9cb0262c20d838109106e2ca25a649b0762401d4

I've seen other projects make it look like this:

git checkout -f step-1

anyone know how i can do this? Or have something i can reference?

-- 
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] renaming or aliasing commits

2013-09-11 Thread John McKown
git tag does that.

git tag step-1 9cb0262c20d838109106e2ca25a649b0762401d4

Or

git tag right-here

with nothing else tags the current (HEAD) commit.

git tag new-name old-name

makes new-name and old-name point to the same commit.

git tag grandfather HEAD~~

and so on.


On Wed, Sep 11, 2013 at 12:41 PM, Rich Naylor stinker...@gmail.com wrote:

 im using git to allow users in a training class to update there
 development space to reflect the chapter/module that they are in. so, the
 user starts the class by cloning a repo, then uses 'git checkout -f '
 to update themselves for each chapter/module. Does anyone know how i can
 rename/alias the commits to something more humanly readable. Currently they
 would type or copy/paste something similar to this:

 git checkout -f 9cb0262c20d838109106e2ca25a649**b0762401d4

 I've seen other projects make it look like this:

 git checkout -f step-1

 anyone know how i can do this? Or have something i can reference?

 --
 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.




-- 
As of next week, passwords will be entered in Morse code.

Maranatha! 
John McKown

-- 
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 rm ./

2013-09-11 Thread superjag
Silly me, I thought this would remove the project directory from the 
staging area, but no, it has to delete the entire project. I was still 
staging my first commit when my project got deleted, so I can't roll back.

I found this:
https://groups.google.com/forum/#!topic/msysgit/TLmc2996nWY

But while I can see my files in some kind of command-line editor, I can't 
save them. ESC:w just makes a beeping noise. Any ideas?

I'm running git under Windows.

 - Jonathan Graef

-- 
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 rm ./

2013-09-11 Thread Konstantin Khomoutov
On Wed, 11 Sep 2013 11:43:24 -0700 (PDT)
superjag superja...@gmail.com wrote:

 Silly me, I thought this would remove the project directory from the 
 staging area, but no, it has to delete the entire project. I was
 still staging my first commit when my project got deleted, so I can't
 roll back.
 
 I found this:
 https://groups.google.com/forum/#!topic/msysgit/TLmc2996nWY
 
 But while I can see my files in some kind of command-line editor, I
 can't save them. ESC:w just makes a beeping noise. Any ideas?
 
 I'm running git under Windows.

Uh... If I can see my files in some kind of command-line editor, I
 can't save them. ESC:w just makes a beeping noise. means
I have run `git show $sha1_name_as_shown_by_git_fsck` and this command
showed me the contents of my file in some kind of command-line editor
then it's just Git spawned the so-called pager which, unless
reconfigured by the user (you) in one way or another defaults to the
program named less [1] which is distributed with Git for Windows.

A pager consumes what another program sends to its standard input
stream (this program is Git in our case) and allows the user to
conveniently (okay, let's not discuss this aspect for a moment) view
this input -- sort of read-only ad-hoc Notepad.

less is ubiquitous in the Unix world but is certainly able to capture
a Windows user by surprise.  To quit less just press the q key (for
*q*uit), and to move the viewport use the page up/page down and cursor
keys.  less is quite versatile -- hit the h key while in it to read its
online help page.

But back to your problem...  The final answer to the thread you
referred to assumed you're familiar with command line, and supposed
that you know about stream redirections supported by it.  Specifically,
if a program prints something to its output, you're able to save this
output by redirecting it to a file, like this:

git show $sha1name  filename

The  filename (also could be spelled without the white space --
filename) is the crucial bit -- it would make `git show` to write
whatever it prints to the file filename.

Git took your by surprise because it tries to be smart and if it
detects it was run on an interactive terminal and the output it's about
to print is larger than the height of this terminal, it spawns the
configured or default pager and sends its output there.  If it detects
its output is redirected by the shell (that  filename thing) it just
prints what it should print, and this output ends up being written into
that file.

See also [2].

1. http://en.wikipedia.org/wiki/Less_%28Unix%29
2. https://groups.google.com/d/msg/git-users/nn3f6FVMSNw/NryIUTdKvFYJ

-- 
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] Re: renaming or aliasing commits

2013-09-11 Thread Rich Naylor
Thx very much John. I was having no luck figuring this out through search. 

On Wednesday, September 11, 2013 10:41:14 AM UTC-7, Rich Naylor wrote:

 im using git to allow users in a training class to update there 
 development space to reflect the chapter/module that they are in. so, the 
 user starts the class by cloning a repo, then uses 'git checkout -f ' 
 to update themselves for each chapter/module. Does anyone know how i can 
 rename/alias the commits to something more humanly readable. Currently they 
 would type or copy/paste something similar to this:

 git checkout -f 9cb0262c20d838109106e2ca25a649b0762401d4

 I've seen other projects make it look like this:

 git checkout -f step-1

 anyone know how i can do this? Or have something i can reference?


-- 
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] How to avoid unecessary recompilation

2013-09-11 Thread sylvain bougnoux
Hello,

We moved from CVS to Git a few months ago. We use Git throught 
GitExtension,  VisualC++9.
We are experiencing the following trouble.

When one is working on an include with many dependancies, eg top.h, and 
wants to pull, eg to get very_bottom.cpp; first git asks to stash 
everything, does the pull, and pops the stash back.
So at the end, top.h has not changed, very_bottom.cpp is updated. Fine.
But in the loop, VisualC++ understands that the file top.h has changed, and 
asks to recompil everything. Worst when top.h is a myproject.vcproj all 
files of myproject are closed in the editor.
Even if our compilation is not that long, 1-2min, it is very annoying, and 
we suppose we are missing something? This scheme worked perfectly using CVS.

The same trouble appears when one wants to push a tiny fix in 
very_bottom.cpp and that he is not up-to-date with the repository. First he 
has to pull, hence stash...

We pull using a rebase to avoid these ugly little useless branches. But 
afaiu, a merge does the same.
I understand it is related with the branching model. But it is definitely 
not that obvious to make a good one with frequent pull/push (eg 1/h).
I cannot imagine, with such a modern system, that the stash cannot be 
avoided when the files have nothing in commun.

I am sorry if this trouble has been discussed hundred of time, but I could 
not find it.

Regard.

-- 
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 rm ./

2013-09-11 Thread superjag
Many thanks.

In short, to recover a file deleted by git rm, use git fsck --unreachable to 
show the files git is holding in limbo, and then use git show $sha1name  
filename to save each one back to your filesystem (where $sha1name is the 
blob ID shown in git fsck, and filename is the desired name of the file to 
save it in).

Now I'm off to make that first commit...

 - Jonathan Graef

On Wednesday, September 11, 2013 2:14:19 PM UTC-5, Konstantin Khomoutov 
wrote:

 On Wed, 11 Sep 2013 11:43:24 -0700 (PDT) 
 superjag super...@gmail.com javascript: wrote: 

  Silly me, I thought this would remove the project directory from the 
  staging area, but no, it has to delete the entire project. I was 
  still staging my first commit when my project got deleted, so I can't 
  roll back. 
  
  I found this: 
  https://groups.google.com/forum/#!topic/msysgit/TLmc2996nWY 
  
  But while I can see my files in some kind of command-line editor, I 
  can't save them. ESC:w just makes a beeping noise. Any ideas? 
  
  I'm running git under Windows. 

 Uh... If I can see my files in some kind of command-line editor, I 
  can't save them. ESC:w just makes a beeping noise. means 
 I have run `git show $sha1_name_as_shown_by_git_fsck` and this command 
 showed me the contents of my file in some kind of command-line editor 
 then it's just Git spawned the so-called pager which, unless 
 reconfigured by the user (you) in one way or another defaults to the 
 program named less [1] which is distributed with Git for Windows. 

 A pager consumes what another program sends to its standard input 
 stream (this program is Git in our case) and allows the user to 
 conveniently (okay, let's not discuss this aspect for a moment) view 
 this input -- sort of read-only ad-hoc Notepad. 

 less is ubiquitous in the Unix world but is certainly able to capture 
 a Windows user by surprise.  To quit less just press the q key (for 
 *q*uit), and to move the viewport use the page up/page down and cursor 
 keys.  less is quite versatile -- hit the h key while in it to read its 
 online help page. 

 But back to your problem...  The final answer to the thread you 
 referred to assumed you're familiar with command line, and supposed 
 that you know about stream redirections supported by it.  Specifically, 
 if a program prints something to its output, you're able to save this 
 output by redirecting it to a file, like this: 

 git show $sha1name  filename 

 The  filename (also could be spelled without the white space -- 
 filename) is the crucial bit -- it would make `git show` to write 
 whatever it prints to the file filename. 

 Git took your by surprise because it tries to be smart and if it 
 detects it was run on an interactive terminal and the output it's about 
 to print is larger than the height of this terminal, it spawns the 
 configured or default pager and sends its output there.  If it detects 
 its output is redirected by the shell (that  filename thing) it just 
 prints what it should print, and this output ends up being written into 
 that file. 

 See also [2]. 

 1. http://en.wikipedia.org/wiki/Less_%28Unix%29 
 2. https://groups.google.com/d/msg/git-users/nn3f6FVMSNw/NryIUTdKvFYJ 


-- 
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 rm ./

2013-09-11 Thread Jimit Modi
Wow. We Love you GIT :).

--
Jim(y || it)




On Thu, Sep 12, 2013 at 2:18 AM, superjag superja...@gmail.com wrote:

 Many thanks.

 In short, to recover a file deleted by git rm, use git fsck --unreachable to
 show the files git is holding in limbo, and then use git show $sha1name 
 filename to save each one back to your filesystem (where $sha1name is the
 blob ID shown in git fsck, and filename is the desired name of the file to
 save it in).

 Now I'm off to make that first commit...

  - Jonathan Graef

 On Wednesday, September 11, 2013 2:14:19 PM UTC-5, Konstantin Khomoutov
 wrote:

 On Wed, 11 Sep 2013 11:43:24 -0700 (PDT)
 superjag super...@gmail.com wrote:

  Silly me, I thought this would remove the project directory from the
  staging area, but no, it has to delete the entire project. I was
  still staging my first commit when my project got deleted, so I can't
  roll back.
 
  I found this:
  https://groups.google.com/**forum/#!topic/msysgit/**TLmc2996nWYhttps://groups.google.com/forum/#!topic/msysgit/TLmc2996nWY
 
  But while I can see my files in some kind of command-line editor, I
  can't save them. ESC:w just makes a beeping noise. Any ideas?
 
  I'm running git under Windows.

 Uh... If I can see my files in some kind of command-line editor, I
  can't save them. ESC:w just makes a beeping noise. means
 I have run `git show $sha1_name_as_shown_by_git_**fsck` and this
 command
 showed me the contents of my file in some kind of command-line editor
 then it's just Git spawned the so-called pager which, unless
 reconfigured by the user (you) in one way or another defaults to the
 program named less [1] which is distributed with Git for Windows.

 A pager consumes what another program sends to its standard input
 stream (this program is Git in our case) and allows the user to
 conveniently (okay, let's not discuss this aspect for a moment) view
 this input -- sort of read-only ad-hoc Notepad.

 less is ubiquitous in the Unix world but is certainly able to capture
 a Windows user by surprise.  To quit less just press the q key (for
 *q*uit), and to move the viewport use the page up/page down and cursor
 keys.  less is quite versatile -- hit the h key while in it to read its
 online help page.

 But back to your problem...  The final answer to the thread you
 referred to assumed you're familiar with command line, and supposed
 that you know about stream redirections supported by it.  Specifically,
 if a program prints something to its output, you're able to save this
 output by redirecting it to a file, like this:

 git show $sha1name  filename

 The  filename (also could be spelled without the white space --
 filename) is the crucial bit -- it would make `git show` to write
 whatever it prints to the file filename.

 Git took your by surprise because it tries to be smart and if it
 detects it was run on an interactive terminal and the output it's about
 to print is larger than the height of this terminal, it spawns the
 configured or default pager and sends its output there.  If it detects
 its output is redirected by the shell (that  filename thing) it just
 prints what it should print, and this output ends up being written into
 that file.

 See also [2].

 1. 
 http://en.wikipedia.org/wiki/**Less_%28Unix%29http://en.wikipedia.org/wiki/Less_%28Unix%29
 2. 
 https://groups.google.com/d/**msg/git-users/nn3f6FVMSNw/**NryIUTdKvFYJhttps://groups.google.com/d/msg/git-users/nn3f6FVMSNw/NryIUTdKvFYJ

  --
 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.


-- 
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.