Git is a distributed source control system.

learn more… | top users | synonyms

140
votes
10answers
56k views

How to tell which local branch is tracking which remote branch in Git?

I would like to know if there's a way to tell which local branch is tracking which remote branch in Git. I'm using one remote server, which is named "origin".
140
votes
14answers
156k views

How do I tell Git for Windows where to find my private RSA key?

My GIT setup runs fine in Linux, but when I try to set things up under Windows (using Git for Windows and TortoiseGit), I don't know where to put my private ssh key (or, better still, how to tell ssh ...
86
votes
7answers
92k views

How do I share a Git repository with multiple users on a machine?

I have a Git repository on a staging server which multiple developers need to be able to pull to. git-init seems to have a flag very close to what I'm looking for: --shared, except I'd like multiple ...
47
votes
4answers
19k views

How do I edit git's history to correct an incorrect email address/name

When I started using git I just did a git init and started calling add and commit. Now I am starting to pay attention and I can see that my commits are showing up as cowens@localmachine, rather than ...
30
votes
11answers
11k views

GIT as a backup tool (am I a silly person?)

So I was in the shower this morning thinking about stuff, and I had an idea which may be terrible or may be brilliant I'm not sure. On a server, install git cd / git init git add . git commit -a -m ...
22
votes
5answers
35k views

How to install git to red hat enterprise linux 5.3 x64?

How can I configure yum to use some repository which has git rpms?
18
votes
7answers
9k views

How do I prevent apache from serving the .git directory?

I have started using git for deployment of websites for testing. How do I prevent apache from serving the .git directory contents? I tried <Directorymatch "^/.*/\.git/"> Order deny,allow Deny ...
17
votes
10answers
20k views

Setting Up Git Repository on Remote Windows Server?

I have a windows server which I can access locally or remotely over the internet through remote desktop connection, etc. I want to set up a git repository (something similar to "trunk" in ...
14
votes
2answers
11k views

Using LDAP as auth method for git repositories

I want to convince my boss that we should be using git for version control. He says, that it absolutely must authenticate users through our central LDAP server. I looked at the various solutions ...
13
votes
3answers
11k views

Setting up a git repo on my GoDaddy hosting plan

I have a project which is version-controlled using git. What I want to be able to do is set up a repo on my (ssh-enabled) GoDaddy shared hosting package so that I can deploy with a push rather than ...
12
votes
6answers
7k views

Git - post-receive hook with git pull “Failed to find a valid git directory”

It's very weird but when setting a git repository and creating a post-receive hook with: echo "--initializing hook--" cd ~/websites/testing echo "--prepare update--" git pull echo "--update ...
12
votes
6answers
2k views

Where's the conventional place to store git repositories in a linux file system tree?

If I make an analogy with the hosting of a web server, I would say that git's data should be in /var/git, so my git repository would be in /var/git/myrepo Q: Is that the right guess ?
12
votes
2answers
741 views

git, nagios and hooks, corrupted git repo

Background We're using nagios to monitor our infrastructure. We don't have the nagios configs under version control at the moment, and there are two of us that manage nagios configuration. As such, ...
11
votes
4answers
2k views

Non interactive git clone (ssh fingerprint prompt)

I want to clone a repo in a non-interactive way. When cloning, git asks to confirm host's fingerprint: The authenticity of host 'bitbucket.org (207.223.240.182)' can't be established. RSA key ...
10
votes
4answers
949 views

Git commit auditing

I have a git server running over ssh and each user has a unix account on the system. Given that two users have access to a repo, how can I be sure which user performed which commit, since the commit ...
10
votes
4answers
1k views

Deploying Files To Multiple Servers

We have a central repository of files in say server-1 at /srv/www. Then we have N number of servers as well. We want server-1 to be able to deploy its files in /srv/www to all servers as quickly and ...
10
votes
4answers
11k views

What firewall ports need to be open to allow access to external git repositories?

What firewall port(s) need to be open to allow access to external git repositories?
10
votes
4answers
6k views

How do you move your Git repository from one server to another?

I need to move Git to a new location and was wondering if there's a way to just rsync my git repository to a new location?
10
votes
1answer
483 views

Can a very large /etc/hosts.deny slow down SSH connections?

I've been using denyhosts for a while and I noticed my /etc/hosts.deny is getting rather large. Denyhosts adds IPs to /etc/hosts.deny, and my denyhosts is configured to never purge IPs. $ wc -l ...
10
votes
1answer
284 views

How well does authorized_keys scale?

If I'm using something like gitolite to handle access control how well does authorized_keys scale? Meaning if I have say 50,000 users what will the performance be like (I'm guessing not very good). ...
9
votes
2answers
4k views

GIT repository over LAN

I am trying to setup a GIT repository over LAN in Ubuntu OS. I am able to setup a GIT repository, but not sure HOW TO expose the repository to other users in LAN. As it requires a server, I installed ...
9
votes
3answers
10k views

How to delete Git repository with Gitosis

I'm using Gitosis to administer some Git repositories on a remote server. Since I'm at the beginning with it, I make a lot of mistakes. That's why right now I need to delete a Git repository that I ...
9
votes
2answers
19k views

git pull specific revision from remote repository

We have a remote git repo that we normally deploy from using git push on our dev server then git pull on on our live servers to get the latest pushed version of the repo. But if we have committed and ...
9
votes
3answers
13k views

Git shell not enabled?

I'm trying to install git server. When I set default shell for my git user to /usr/bin/git-shell I get an error upon login as git. fatal: Interactive git shell is not enabled. hint: ...
9
votes
2answers
2k views

Which is better for website backup - rsync or git push

I run 2 LAMP web servers at different providers for disaster recovery purposes - a high powered live server, and a low powered backup server. Currently I rsync all the data from the live server to ...
8
votes
3answers
7k views

Enabling nginx Chunked Transfer Encoding

It looks like nginx 0.8.35 may support chunked transfer encoding: Changes with nginx 0.8.35 01 Apr 2010 *) Change: now the charset filter runs before the ...
8
votes
5answers
648 views

Hosting multiple repositories (svn, hg, git)

I've recently acquired a dedicated server, and need to move several repositories to it from a source control hosting service. Having not much experience in server administration however I have no clue ...
8
votes
1answer
2k views

How to retrieve the last modification date of all files in a git repository

I know how to retrieve the last modification date of a single file in a git repository: git log -1 --format="%ad" -- path/to/file Is there a simple and efficient way to do the same for all the ...
8
votes
2answers
2k views

Encrypt git repository on server (safe against theft of physical hardware)

I have a production server (Ubuntu, running 24/7) with a git repository and some client computers each with a working copy of this repository. In the client computers, simply using home folder ...
7
votes
11answers
1k views

Git and Mercurial

I would like to know: What's the difference between Git and Mercurial? What are the pros and cons of using them? How good is the Windows support for both tools?
7
votes
2answers
5k views

Why does the Debian Lenny git package not install git?

If I run the following command on Debian Lenny: apt-get install git ... I'm unable to use git: # git --version bash: git: command not found
7
votes
3answers
6k views

How to stop git-daemon on debian

I'm running debian lenny server, and I've installed git on it. Now there is a git-daemon process (and appropriate opened port), but there is no /etc/init.d/git script that I could stop. I know there ...
7
votes
4answers
1k views

Putting a whole linux server under source control (git)

I am thinking about putting my whole linux server under version control using git. The reason behind it being that that might be the easiest way to detect malicious modifications/rootkits. All I would ...
7
votes
1answer
1k views

How do I fix the metainformation on the first commit in git?

This is a related question to How do I edit git’s history to correct an incorrect email address/name. Using git rebase -i <first commit>, git commit --amend --author "Foo ...
7
votes
2answers
1k views

What are the pros and cons of SSH and HTTP for a git server?

I want to setup a git server. I have found several how-to's, well detailed. Some describe the installation for a git-server accessible thru Ssh, while others, accessible thru HTTP. ( Others even ...
7
votes
1answer
3k views

debian: FATAL -> Failed to fork

First time in my life I have something like this: root@peklan:~# aptitude install git-core No packages will be installed, upgraded, or removed. 0 packages upgraded, 0 newly installed, 0 to remove and ...
7
votes
9answers
2k views

Which Version Control Systems support LDAP/AD users and groups

Does anyone know which of the big players (if any) support LDAP/AD users and groups for authentication AND database permissions? Specifically, I'm wondering if SVN, GIT, Mercurial etc. will allow ...
7
votes
4answers
2k views

Is it possible to use etckeeper with a single shared git repository?

I noticed that several people have recommended using etckeeper to apply version control to my /etc directory. It appears to me that the default install puts a repository on the same machine as the ...
7
votes
2answers
7k views

How to specify an SSH key for Hudson with git plugin?

I've got Hudson (continuous integration system) with the git plugin running on a Tomcat Windows Service. msysgit is installed and the msysgit bin dir is in the path. PuTTY/Pageant/plink are ...
6
votes
3answers
5k views

Specify SSH Port for Git

I use a non-standard ssh port (1234) for most of the servers I connect to. So in my ssh config file I have: Port 1234 But github.com uses port 22. When I try to connect to github it obviously ...
6
votes
5answers
5k views

Can't install GIT on a CentOS 6.0 x64

I'm trying to install GIT by either RPM or YUM but i can't. I get the following error: error: Failed dependencies: libcrypto.so.10 is needed by git-1.7.1-2.el6.i686 libcurl.so.4 is ...
6
votes
4answers
4k views

Yum doesn't install latest version of Git on Centos6

When I go to Gits download section it mentions that latest version is 1.8 and I can install it by yum install git on Fedora. I'm running CentOS6 so that command should also work for me, but yum tells ...
6
votes
5answers
1k views

How do I get transparent, efficient, file system snapshotting or versioning on ext3/4?

I've long thought about versioning file systems. This is a killer feature and I've looked at Wayback, ext3cow, zfs, fuse solutions, or just cvs/svn/git overlays. I consider ext3cow the model for my ...
6
votes
4answers
26k views

fatal: http://myserverip/home/git/example.git/info/refs not found: did you run git update-server-info on the server?

I followed this example to set up a git repository on my server. It worked, and I successfully pushed my code to it. But now, how do I pull or clone? Using the docs, I tried git clone ...
6
votes
1answer
642 views

Is it possible to have a Git repo in Windows Azure?

Does anyone know if it's possible to have a Git repo hosted on Windows Azure?
6
votes
2answers
207 views

Making ssh easier for our Windows user community

I work in an academic environment where we are providing a variety of ssh-accessible compute resources. We also provide git repository hosting, and we require ssh for read/write access to the ...
5
votes
4answers
4k views

Create SSH user with limited privileges to only use Git repository

I have a git repository hosted on my SunOS server, that I remotely use through ssh git clone ssh://myUser@mydomain.com/path/to/git Now I need to add more users to be able to access that repository, ...
5
votes
4answers
1k views

Correct user names when tracking /etc/ in git repository and committing as root

We use git to track changes in /etc/ on our servers. Administrators work as root when changing files in /etc/, and thus their commits have author root <root@machinename> This is not very ...
5
votes
2answers
15k views

How to set up Gitweb

I have set up Git on a server, using gitosis to control commit access. I would like to configure my Git system so that anyone inside our firewall can have read access to the Git repository, and I ...
5
votes
2answers
2k views

push commits to git (gitolite) repository messes up file permissions (no more trac access)

already posted here so feel free to answer there. everytime i commit/push something to the git server the file permissions change (all added/edited files in the repository have no read and execute ...