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

11
votes
1answer
9k views

GitHub for Windows Install Error

I'm trying to install the GitHub for Windows that I downloaded from the GitHub site. However, I get the following error message: Application cannot be started. Contact the application vendor. ...
11
votes
1answer
9k views

Problem using git on Windows 7 with msysgit and .ssh keys

I'm using git on my Ubuntu machine with my existing ssh keys. Now I have to use Git on Windows 7, and need to use the same keypairs. I have set up msysgit and created an .ssh folder in ...
11
votes
3answers
43k views

Using GIT on Aptana 3 standalone

The only references I see to GIT in Aptana Studio 3 (the standalone version) are under preferences where the only field is to identify an executable (do I need to do that?) and importing a project, ...
11
votes
3answers
12k views

Update git on mac

I can't remember how I installed git a while back....but now it's living in /usr/bin/git and needs to be updated. I don't care how (pre-compiled or build my own) but what I don't want is another ...
11
votes
2answers
777 views

How can I achieve separate colors for current, local, and remote ref names when using a custom git log format?

I have a custom git log format that I use. I have color.ui=true set in my .gitconfig. For example this simple format: git log --pretty=format:"%h %d %s" --decorate This would print something like ...
11
votes
2answers
6k views

Homebrew won't link git

When I installed git or upgrade git via brew I couldn't link it with brew link git. If I try sudo brew link git I get: cowardly refusing to sudo brew link It says that I have to check the ...
11
votes
1answer
2k views

How can I selectively disable zsh's version control integration when my CWD is on a remote filesystem?

I'm running zsh on OSX and on occasion I have to work on a mounted sshfs volume. However, git is REALLY slow over sshfs mounts. My prompt makes use of the vc mode stuff that zsh provides built in, but ...
10
votes
3answers
9k views

How to delete the git reference `refs/original/refs/heads/master`?

What's this in the yellow round box? I've tried git branch -D, git tag -d but none succeeded. So how to delete it?
10
votes
4answers
7k views

Using git as a central repository

I have set up git for my own use--so I can access a project from 'anywhere', and keep version safety if I happen to be working on part X over here, and part Y over here, and can merge if necessary. ...
10
votes
1answer
2k views

ZSH tab completion of git commands is very slow. How can I turn it off?

If I type: rm <TAB> I'll see possible completions almost instantly. However, if I type: git rm <TAB> It'll hang for several seconds if it's in a git repo, or fail to show any ...
10
votes
2answers
6k views

How to have Sublime Text 2 show git folders and files in the sidebar?

When adding a folder to a Sublime Text 2 project, it doesn't seem to show .git subfolders. It also seems these files cannot be opened by Ctrl-P. I disabled the Git plugin but that didn't help.
10
votes
1answer
2k views

Find recently added files with git

I want to get a list of the most recently added files using git. Is there any sane way to do this?
10
votes
2answers
4k views

How do I use installed Vim in Git Bash instead of the one that came with Git?

I've installed Vim and Git to C:\Program Files (x86)\(vim|git) respectively. When I run Vim from Git Bash, it runs the internal version of Vim that came with the Git installer. Is there a way to ...
10
votes
1answer
6k views

SSH config - same host but different keys and usernames

I've set up two GitHub accounts, but I can't get ssh keys to work correctly. I've tried various configs. Host github_username1 HostName github.com IdentityFile ~/.ssh/rsa_1 User ...
10
votes
3answers
6k views

Homebrew installation of git won't take precedence over system version (in /usr/bin/)

OS X (or Xcode) comes bundled with git 1.7.something, but after brew install git (1.8.0), which git keeps returning the old /usr/bin/git. This is what I get when I echo $PATH right now: ...
10
votes
3answers
10k views

How do I access a git repository on a samba share?

I have a Samba share set up that I'd like to put a git repository on. I've tried searching google for the best way to use git on a Samba share, but it seems difficult to find anything on doing this ...
10
votes
4answers
1k views

How to track $HOME with git

I would like to track my $HOME dir with git. I've got many other git repos in other subdirs (eg $HOME/projects/repo_1 and so on), which shouldn't be tracked, since they already are. I have found ...
10
votes
1answer
4k views

Does git-clone have resume capability?

Does the git-clone command have resume capability? If it gets interrupted while I'm downloading a large repository will it resume if I give the same command again?
10
votes
1answer
2k views

GitHub for Windows can not sync to repo while command line tools can

I have my git repos hosted on a server using Gitolite. I can access them using SSH like this and it works from Mac OS X/Linux: git clone git@example.net On a Windows 8 Box I now have installed ...
9
votes
2answers
3k views

I need sudo without password prompt, for scripts. Where did I go wrong?

I am in sudo group all right: $ id uid=1002(molot) gid=1002(molot) groups=1002(molot),27(sudo),33(www-data) In my sudores I seem to have appropriate setting: sudo ALL=(ALL:ALL) NOPASSWD: ALL ...
9
votes
2answers
5k views

Colors in git output?

I have seen some examples on people getting colors in git output. I tried the following guide http://scie.nti.st/2007/5/2/colors-in-git but unfortunately it didn't succeeded. Is there anything else ...
9
votes
1answer
2k views

How to have .git folders ignored by Eclipse projects

Whenever I use eclipse on a folder with a .git folder, the .git folder is included in project wide searches and it is displayed in the Navigator view. Is there some way to: Make sure that .git ...
9
votes
4answers
5k views

Can you remove a file from Mercurial without removing it from the filesystem like Git?

I've got some files in a repo that I don't want tracked, is it possible to remove them without removing the actual files from the filesystem? This would be equivalent to git's rm --cached.
9
votes
2answers
10k views

How to view only the unmerged files in git after a merge failure

While merging some of the files failed to merge. git status shows both the successful and failed merges. How to view only the unsuccessful merge files(conflict). Currently i am using the ...
9
votes
2answers
2k views

Is there a way to run git within Powershell?

Is there a way to run git within Powershell? I have a Windows 7 box with msysgit. I'd like to have a single shell to also run all my git commands as well as play around with Powershell scripting.
9
votes
2answers
5k views

How to setup own GIT Server? Whats bare/non-bare repos?

I am trying to setup a simple GIT server. I have Ubuntu installed on a Virtual PC (Virtual Box). I installed GIT, created a repo etc git init git add . git commit "..." Then on Windows, I did ...
9
votes
4answers
3k views

Where should I put my Git repository?

I have an Ubuntu box at home, and I want to have a directory that has all (more or less) my Git repositories. Eventually (when I get some team projects at school this year), I'll want have some of the ...
9
votes
2answers
3k views

Tweaking zsh git autocompletion

I just switched from bash to using zsh 4.3.4 on Ubuntu Hardy. I'm developing with git and I find myself constantly fighting with the default git completions: filename completion tries to be smart by ...
9
votes
2answers
4k views

How can I visualize Git Flow branches?

I use the Git Flow workflow. But I can't generate a good-looking log in tree graph. The size is too small and won't show all the branch relationships like in the Git Flow chart. How can I create a ...
9
votes
1answer
8k views

How can you avoid being asked to enter your BitBucket password when you push to BitBucket wiki?

I'm not sure if everyone experiences this - when I edit a BitBucket wiki locally (through a git repository) I have to enter my BitBucket password for every pull and push. Is there any way around ...
9
votes
2answers
7k views

Getting remote git commit log without local copy

I want to get a copy of the commit log from a remote GIT repository without cloning/pulling it to my local machine and using only SSH. Is this possible? For example, I want to do something like: git ...
8
votes
1answer
8k views

Cloned GitHub repos ask for a password, while originally created don't

I've just lost a bunch of repositories from my disk, so I've cloned them from GitHub. These are now asking for username and password each time I push something to GitHub. Those that haven't been ...
8
votes
5answers
17k views

Installing Git on CentOS [closed]

How install git on CentOS? I find this manual. Is it good?
8
votes
1answer
14k views

How can I merge two branches without losing any files?

I have two branches with the following files in there: branch a: file_a file_b file_c branch b: file_a file_d file_e I want to merge them, so that I get both files from a and b (and files that ...
8
votes
1answer
3k views

Using the IdentityFile directive in ssh_config when AgentForwarding is in use

Is it possible to specify forwarded keys using the IdentityFile directive in .ssh/config? I ran into this quirk when trying to deploy some code via Capistrano/GIT on our production server. Both my ...
8
votes
4answers
6k views

Removing git from /usr/bin

I'm on OS X 10.8 and I'm using Homebrew. brew doctor tells me that I have 2 git installations, one in /usr/bin and the other one in /usr/local/bin. Is it a bad idea to remove git from /usr/bin? If ...
8
votes
2answers
2k views

Is it possible to have git gui / gitk look good on a retina Macbook Pro?

I really love git gui and gitk. They work very well for me and I know exactly how to use them. Sadly, they look really pixelated and ugly on my retina macbook. Since it's just text and chrome it would ...
8
votes
1answer
978 views

What is an equivalent of git rm -r … in the emacs magit package?

I want remove some folders from my repository and I can do it as usual with git rm -r junk-folder But how I can do this from emacs with magit package?
8
votes
3answers
7k views

Git chmod problem: Checkout screws exec bit

Under Ubuntu and Debian the last committed files are getting the execution bit set, when I try a checkout afterwards. It's quite strange and driving me nuts: $ ls -l file -rw-r--r-- ... file # on ...
8
votes
3answers
2k views

Adding git branch to bash prompt on snow leopard

I am using this: $(__git_ps1 '(%s)') It works however it does not update when I change directories or checkout a new branch. I also have this alias: alias reload='. ~/.bash_profile' Sample run: ...
8
votes
1answer
4k views

vim not loading _vimrc file when launched from git bash

I have downloaded and installed git for windows (msysgit) and frequently used the included git bash. Whenever I run vim from git bash my _vimrc file is not loaded because there is syntax highlighting ...
8
votes
1answer
1k views

Git equivalent to hg update

I've used Mercurial for some time now, and am used to its workflow. Suddenly, I need to work with a Git repository, and I cannot make the install work from the head revision. In Mercurial I would ...
8
votes
1answer
32k views

another “SSH connect to host github.com port 22: Bad file number”

I have a problem with my first-time SSH connection. Yes, I've already done your guides, already tried your "Dealing with firewalls and proxies" article and the problem is still occuring. I am using ...
8
votes
2answers
2k views

gVim as git editor under cygwin

I use msysgit and I'd like to have gvim as my git editor. I use cygwin bash instead of git bash. Running $ /cygdrive/c/Program\ Files\ \(x86\)/Vim/vim73/gvim.exe starts gvim. But if I set this ...
8
votes
3answers
3k views

Vim powerline doesn't show the current branch

I'm using the vim plugin called powerline and it isn't showing the git branch I'm on, while it's supposed to be activated by default. The fugitive plugin is installed, though I don't think it was ...
8
votes
1answer
6k views

How to tell dropbox to ignore git files?

I have been keeping my vim files in Ubuntu One and since I have a lot of plugins installed as git submodules (or however vundle installs them) and I'm only interested in updating these repositories on ...
8
votes
3answers
4k views

Git corrupt master branch

I open my Git repository using gitExtensions on Windows 7 for a Visual Studio project. It is suddenly empty. The repository exists, but all my commits have disappeared. I am using the graphical ...
8
votes
1answer
631 views

How to filter commits by author in SourceTree?

In the branch view of SourceTree, I see all the commits. I'd like to filter the commits to show only the ones committed by me/someone. How can I do this? Thanks.
8
votes
0answers
442 views

Error from egit installation

Just installed a fresh 32 bit copy of Java and Eclipse. I'm now trying to add egit for the first time, following the instructions here (using the main repository). I receive this error when I try to ...
7
votes
8answers
3k views

Using Git to Manage An iTunes Library?

I've been considering using Git to manage my iTunes library and allow me to sync it between computers. Can you think of any reasons why this would be a bad idea?