Difference between revisions of "Talk:Git"

From ArchWiki
Jump to: navigation, search
(Not systemd compatible: Remove closed discussion.)
(9 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 
== Merge with Gitweb ==
 
== Merge with Gitweb ==
  
As said, the sections to get git working over ssh, http and the git protocol should in my opinion be placed in this article.
+
As said, the sections to get git working over ssh, http and the git protocol should in my opinion be placed in this article.<br>
 +
-- [[User:Markg85|Markg85]] 5 March 2011
  
 
== Bash completion ==
 
== Bash completion ==
Line 8: Line 9:
 
right?
 
right?
  
Maybe note that it's also possible by installing bash-completion? --Xerdomii
+
Maybe note that it's also possible by installing bash-completion?<br>
 +
-- [[User:Xerdomii|Xerdomii]] 6 May 2011
 +
 
 +
:The default {{ic|/etc/bash.bashrc}} (from the bash package) sources {{ic|/etc/bash_completion}} (optionally from the bash-completion package) if it exists.  The {{ic|bash_completion}} script intern sources files in {{ic|/etc/bash_completion.d/}} if they exist.  With Arch's git package a copy of {{ic|/usr/share/git/completion/git-completion.bash}} ends up in the {{ic|/etc/bash_completion.d/}} directory.  So, if you have the {{Pkg|bash-completion}} package installed, completion for git should work automatically as soon as {{ic|/etc/bash.bashrc}} is processed.
 +
:-- [[User:James Eder|James Eder]] 13:27, 20 June 2011 (EDT)
 +
 
 +
::AFAIK, [https://www.archlinux.org/packages/?name=bash-completion bash-completion] does not put anything into {{ic|/etc/bash_completion.d/}}, so the current instruction is misleading. The thread [https://bbs.archlinux.org/viewtopic.php?id=147462 __git_ps1 isn't found anymore] seems to be the only accurate guide available, at the moment.
 +
::-- [[User:Mloskot|Mloskot]] ([[User talk:Mloskot|talk]]) 19:52, 19 September 2012 (UTC)
 +
 
 +
== Smart HTTP ==
 +
 
 +
Trying to follow the instructions to set up HTTP access, I ran into following issue:
 +
 
 +
error: Cannot access URL http://<server>/git/example/, return code 22
 +
fatal: git-http-push failed
 +
 
 +
Acccording to http://dev.bazingaweb.fr/2011/02/23/how-to-set-up-git-over-http.html
 +
the ''config'' file on the remote repository needs to get a couple new lines:
 +
 
 +
[http]
 +
    receivepack = true
 +
 
 +
After this little change it all works for me.<br>
 +
-- [[User:Gunnar]] 4 May 2012

Revision as of 07:02, 15 March 2013

Merge with Gitweb

As said, the sections to get git working over ssh, http and the git protocol should in my opinion be placed in this article.
-- Markg85 5 March 2011

Bash completion

Unless I'm mistaken, bash completion comes with git now so the instructions should be changed to simply:

source /usr/share/git/completion/git-completion.bash

right?

Maybe note that it's also possible by installing bash-completion?
-- Xerdomii 6 May 2011

The default /etc/bash.bashrc (from the bash package) sources /etc/bash_completion (optionally from the bash-completion package) if it exists. The bash_completion script intern sources files in /etc/bash_completion.d/ if they exist. With Arch's git package a copy of /usr/share/git/completion/git-completion.bash ends up in the /etc/bash_completion.d/ directory. So, if you have the bash-completion package installed, completion for git should work automatically as soon as /etc/bash.bashrc is processed.
-- James Eder 13:27, 20 June 2011 (EDT)
AFAIK, bash-completion does not put anything into /etc/bash_completion.d/, so the current instruction is misleading. The thread __git_ps1 isn't found anymore seems to be the only accurate guide available, at the moment.
-- Mloskot (talk) 19:52, 19 September 2012 (UTC)

Smart HTTP

Trying to follow the instructions to set up HTTP access, I ran into following issue:

error: Cannot access URL http://<server>/git/example/, return code 22
fatal: git-http-push failed

Acccording to http://dev.bazingaweb.fr/2011/02/23/how-to-set-up-git-over-http.html the config file on the remote repository needs to get a couple new lines:

[http]
   receivepack = true

After this little change it all works for me.
-- User:Gunnar 4 May 2012