Git is an open source distributed version control system originally designed and written by Linus Torvalds. It is generally used to keep track of source code for software projects. As a DVCS, Git provides powerful help with branching, merging, and distributed development.

learn more… | top users | synonyms

6
votes
8answers
2k views

Git Client for OS X & Windows? [closed]

Does anybody know of a stable release of a GUI Git Client? Preferrably one that can run on both Mac OS X & Windows..... Heard about SmartGit but it's still in Beta and i'm not sure I have time ...
6
votes
3answers
5k views

How to execute commands as root in git post-receive hook

I just recently set up a remote git repo on a server for a web app running as an Upstart service. I'd like to use the post-receive hook to trigger actions that are required to update the application ...
6
votes
1answer
4k views

Why is git so slow with large files?

I was trying to use git to manage my pictures (backup / take snapshots). The entire library is several GB. Most of the files are JPGs of 2-3M. When I was adding the files into repository, it seemed to ...
6
votes
1answer
4k views

git hard links - does it know a file is a hard link?

I started using hard links instead of symbolic links to organize files ... I've been doing this for pictures I take to categorize them as well as indicate which ones I want to print, etc. I'm using ...
6
votes
1answer
4k views

Correct location of git on Mac OS X

On Mac OS x 10.6.6 I have git installed in /usr/bin/ I wanted to update the git version however the git installer puts it in /usr/local/git/bin/ I realise I could rearrange to path to point to the ...
6
votes
1answer
818 views

Is git-annex appropriate for my scenario?

I have a git repository with source codes I want to put in the open on github. However, I also have gigabytes of data that I don't want to have in the open and in the repo - they are big, they are ...
6
votes
1answer
494 views

Can you GPG sign old commits?

Git now has the ability to sign commits with git commit -S, which is great, but sometimes I forget the flag to commit, and sometimes I mail myself patches which I apply with am, and that command ...
6
votes
1answer
578 views

.gitignoring pdf file only when a tex source is present

I'd like to set up a global .gitignore file in my home suitable for working with TeX files. So typical TeX junk files such as *.log, *.aux, *.synctex.gz would go in it. The next step, however, is ...
6
votes
1answer
3k views

What exactly is the git extensions “Amend last commit” button doing?

I've accidentally pressed the "Amend last commit" button in git extensions. My last commit has already been pushed/shared with others, so I actually do not want to do that. I usually used this button ...
6
votes
1answer
847 views

How to list every file for every revision in Git (like Mercurial's hg manifest --all)?

Mercurial has a command to list every file that the repository has for every revision: hg manifest --all Is there an equivalent command in Git?
6
votes
2answers
5k views

EGit fails with “git-upload-pack: command not found”

I know very little about git or EGit. I installed EGit into Eclipse Indigo. I got a git path from someone who has some code in that repo. I tried to clone the repo. It failed with the following ...
6
votes
1answer
113 views

How can I allow individual developers to have their own space to create git repositories?

I have a server that is essentially a gitosis setup. I have a git user that has access to all the shared repositories. What I would like to do is have each developer be able to have their own "area" ...
5
votes
7answers
6k views

Setting up SSH/Git on Cygwin yields “Bad permissions on ~/.ssh/config”

I'm attempting to setup Git with OpenSSH under Cygwin. I almost got everything setup. I have the agent and public key and all that.. but now I get this really weird error: $ git pull -u origin master ...
5
votes
4answers
9k views

Homebrew install problems: Permission denied - /Library/Caches/Homebrew/Formula/libksba.brewing

I've been having problems installing Homebrew since changing my home username on my Mac OSX 10.6.8 computer. After removing all files from the previous Homebrew installation since that didn't work, I ...
5
votes
2answers
15k views

Unable to “git stash pop” due to conflict

I have a local git repository and had several modified files. Then I needed to quickly produce a fix for something so I stashed my changes (git stash) edited file (vi file) committed (git commit) ...
5
votes
3answers
1k views

Add as if from the root folder of the repository

This has caught me up a couple times. I have a terminal open inside a GIT repository. I do git status to see all the changes across the repository. I then do git add -A, git commit -m "Some text" and ...
5
votes
1answer
2k views

Tell git which private key to use for a user without home folder

I was reading the question Tell git which private key to use, and the answer doesn't apply for a case were the user doesn't have any home directory. We're setting up a Jenkins server right now, and ...
5
votes
3answers
4k views

Can't use homebrew installed git

I'm encountering a really weird issue when I try to use the latest version of git I just installed via homebrew. which git is pointing me to the homebrew install, but calling git returns the original ...
5
votes
1answer
5k views

Can't run “git” without sudo on OS X

I have an administrator account on my OS X Lion 10.7.2. I have installed a few applications through this account, but I am not able to run them without sudo. For example, I installed git and I cannot ...
5
votes
2answers
437 views

What is causing git byte order error?

I can no longer git svn rebase (using msysgit on Windows 7). The error starts with: Byte order is not compatible at ../../lib/Storable.pm And ends with: Could not unmemoize function ...
5
votes
1answer
1k views

PDFs in git, reduce size

I have a git repository with many PDF files in there. The git repository is increasing so much in size that it's very complicated to clone the repository to a new host when the Internet connection is ...
5
votes
1answer
6k views

How do you stop or prevent gitlab from running on startup?

I've installed gitlab on Ubuntu 14.04, from the following deb file: gitlab_6.9.2-omnibus-1_amd64.deb It works beautifully. But I want to perform some maintenance on the box without gitlab running, ...
5
votes
2answers
1k views

Vimdiff and git all at once

I use vimdiff as my difftool with git. Let's say that I've changed twelve files. The problem is that sometimes I run git diff and around the fourth or fifth file I see something that I want to ...
5
votes
1answer
611 views

When changing branches in git, how files are replaced?

There's something I don't understand about how git manages files when changing branches: When I run git branch xxx What does happen to the existing physical files? Are they being moved? Deleted? ...
5
votes
3answers
5k views

Git — SSH Agent not working

The back story -- I've been using Git on this computer (Windows XP) for about 8 months with no problem. Suddenly, last week, it is no longer asking me for my username and password when I start Git up. ...
5
votes
3answers
859 views

git alias for merging current branch with master

I'm trying to create a git alias that merges the currently checked out branch into the master branch. Specifically I'd want to quickly get my master branch get up to speed with what I'm working on. ...
5
votes
1answer
3k views

How to set to pull the same branch by default?

When I pull from the new added remotes, I have to specify the branch name explicitly: $ git pull remote1 ... Error: you didn't specify a branch name. $ git pull remote1 master Though I'm working ...
5
votes
1answer
4k views

Atlassian SourceTree: How to change line endings globally?

Is there a way either in Atlassian SourceTree or with my current git host (BitBucket) to change the line endings globally for all my repositories. I think they are currently set to Unix (I think I ...
5
votes
1answer
1k views

Error while installing Perl package Term::ReadKey in Cygwin

I'm trying to use git via cygwin Well, I used this command to clone the svn content to a local git repository: git svn clone svn://path/to/my/project --username myuser Git was returning: ...
5
votes
1answer
4k views

What command does “Sync Branch” do on Github application

As the title suggests, which operations does the "sync branch" perform on the github application for OS X? Does it do a full clone of the repo again?
5
votes
1answer
1k views

How do I point GitHub for Windows to my existing repository folders?

I installed GitHub for Windows, and it's a very smooth program (looks exactly like any of the Live programs). However, it lists my GitHub repositories and wants me to clone it to ...
5
votes
3answers
3k views

Using git, how do I go back to first commit then go through the history?

I cloned a project from Github and now I wish to revert it to the first commit, how would I do this? Also, once I am back to the first commit, how do I go up to the second commit, and then from the ...
5
votes
2answers
3k views

Installing sha1sum on git-bash (MinGW)

I've been using git-bash on Windows 7 a lot. I gather it is a wrapper of MinGW. It has md5sum but not sha1sum. I'd like to install sha1sum, but I can't figure out how. When I try mingw-get, it says ...
5
votes
3answers
1k views

How to use git annex on an existing repository?

What is the best way to import all big files (or all binary files) into git annex, when they are already in a git repository? I don't want to lose all of my commits, so I think it's not a good idea ...
5
votes
2answers
3k views

Add a parent directory to a git repositoy

I have created a git repository for the C implementation of a program. I am about to add a Matlab implementation and I would like to have a single repository with two subdirectories: one for the C ...
5
votes
1answer
346 views

How to store git repos of abandoned projects?

I have over 200 projects on my workstation, every one is a git repository. Most of them are superseded or otherwise abandoned. I still keep the code in case I ever need anything from them. Currently, ...
5
votes
2answers
11k views

How to set up SSH auth with Windows/git/tortoisegit/putty/Synology

I'm hopelessly confused. I am trying to stop tortoisegit from prompting me for a password every time I pull/push (I don't mind once for each time I log on to Windows, but thereafter I want it to be ...
5
votes
1answer
1k views

What is the difference between git svn init + fetch and git svn clone?

While trying to use locally Git at my workplace where we use SVN I was searching a lot for how to set everything up. From what I found it seems there are two approaches to the problem, either: git ...
5
votes
2answers
1k views

Remove all “deleted” files in Git

Is there a better solution for removing manually-removed files from the Git repository than my current error-prone command? git status | grep deleted: | cut -d: -f2 | xargs git rm
5
votes
2answers
2k views

I left my .git directory readable by the web server, what risks do I have?

On one of my web applications, I accidentally left the .git directory readable by the web server for the last few weeks. Index listing was disabled. Visiting the website.com/.git URL would result in a ...
5
votes
1answer
3k views

Agent Forwarding Through Different Usernames (Git & Deployment)

This query isn't directly related to Git, but since one of Git's supported transports is SSH, and I'm trying to use agent-forwarding, I thought I would ask for clarification (the man pages have let me ...
5
votes
3answers
3k views

git: Keep changelog for file when moving to a different repository

I am versioning my config files with git. Now I need to move some of my config files to a different repository, to achieve a clean structure. Is there a way I can keep the change log for a file if I ...
5
votes
1answer
308 views

How can I use vim to view git diffs on Windows?

I want to use vim to view the output of git diff. I am running Windows 8 and I have vim 7.4 installed. I have, for convenience, created an environment variable VIMDIR set to Vim's install directory ...
5
votes
1answer
2k views

is there a way to check the integrity of a cloned repo.?

I have checked out a remote repo. Now I did some operations of adding some file to the repo. as well as (perhaps) removing some files in the repo. In both the instances git was not informed of the ...
5
votes
2answers
13k views

Git permission denied (public key) error

I have connected many times to github and know about generating ssh keys and putting the id_rsa.pub into github settings. But for some reason with this install I can not get it to connect. I am just ...
5
votes
3answers
2k views

git-tfs and msysgit on Windows 7

I've installed msysgit [msysGit-fullinstall-1.7.4-preview20110204.exe] on Windows 7 64-bit, and extracted git-tfs [GitTfs-0.11.0.zip] into a directory on my machine. I've setup both the msysgit ...
5
votes
1answer
4k views

keyless public read-only access on gitolite

I was wondering if it was possible to configure gitolite to let anybody clone a repository without having to do the whole public key song and dance. Obviously I don't want people to be able to ...
5
votes
3answers
6k views

How can I make git commit files in a symlinked folder

I have two folders: /home/me/code/project/ /srv/www/projectfiles/ In the /home/me/code/project folder, I have symlinked static to /srv/www/projectfiles/ i.e. /home/me/code/project/static/ -> ...
5
votes
1answer
4k views

How to show what will be updated next pull?

In SVN, doing svn update will show a list of full paths with a status prefix: $ svn update M foo/bar U another/bar Revision 123 I need to get this update list to do some post-process work. After I ...
5
votes
2answers
2k views

Git and sub repositories

Is there anyway to force git to include files and directories in other repositories that are residing somewhere within the current repository? The reason I ask is that I have a layout that is ...