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

14
votes
2answers
2k views

Match Windows 7 default permissions to Cygwin created file defaults

I am using cygwin on Windows 7 professional. When I create new files such as MyNewFile.java it seems to get default permission set to 755. This is not what I want. I want it to be 644 for regular ...
14
votes
1answer
537 views

EGit (Eclipse) wrongly interpreting file names with non-ASCII characters?

I recently switched to using a Git repository within Eclipse (Juno SR2), using EGit. In our project, some file names contains umlauts and other special non-ASCII-characters. On the command line, git ...
13
votes
3answers
14k 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 ...
13
votes
3answers
2k views

Change tabsize in git-gui

I was wondering if it's possible to change the tabsize in git-gui from 8 characters to 4. The only thing I found was core.whitespace = tabsize=4 but that only affects diff. The reason why I'm asking ...
13
votes
3answers
8k views

Is it OK to copy (not clone) a git repository using basic Unix commands?

I’m pretty new to using git and was wondering if it’s ok to copy a Git repository with common UNIX commands (like cp or tar/untag), rather than through git clone. I’m in the situation where I have ...
13
votes
1answer
8k 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 ...
13
votes
2answers
2k views

How to reuse/extend etckeeper's metadata engine for git control of non-/etc filesystems, or extend git natively with said capability?

Overview + question I want etckeeper-like filesystem metadata control for non-/etc, git-controlled directories. Home and web-app directories, among others, are classically sensitive to metadata (...
12
votes
3answers
7k views

Despite the fact that GIT does NOT store file deltas, can you still rollback to previous file versions (unlimited times?)

I've read that Git does not store file deltas. If this is true, how does it support file rollback to previous versions? If it's storing the entire file the repository space on disk must grow to be ...
12
votes
2answers
6k views

git on command line no longer works on El Capitan

Having just installed OS X 10.11 last night, I was surprised to see that my Bash terminal did the following: $ git xcode-select: note: no developer tools were found at '/Applications/Xcode.app', ...
12
votes
1answer
3k 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 ...
12
votes
1answer
12k 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. I'...
12
votes
1answer
6k views

getting git colors in OSX terminal

I have just installed XCode and GitHub for Mac. I have successfully run "GitHub->Install Command Line Utility". I can connect to repositories with both apps and I can use the git command in the ...
12
votes
2answers
3k 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 ...
12
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 ...
12
votes
2answers
879 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
5answers
6k views

how do I add the 'tree' command to git-bash on Windows?

I'm using git-bash on Windows 7. I'd like to see a tree of the current directory. However: jcollum@DEVELOPER01 ~/Dev/express_coffee $ tree . sh....
11
votes
4answers
6k 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.
11
votes
1answer
3k 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?
11
votes
2answers
7k 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.
11
votes
1answer
2k 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?
11
votes
1answer
10k 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 Users\username\...
11
votes
3answers
44k 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
2answers
9k 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 ...
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
2answers
9k 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 ...
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
3answers
10k views

How to upgrade to latest git on debian 7?

I have installed git through apt-get on debian 7 which gives me: # git --version git version 1.7.10.4 I would like to ugrade to the latests version of git. I have tried: sudo apt-get install ...
10
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 ...
10
votes
2answers
11k views

git pull does nothing / git push just hangs / debug1: expecting SSH2_MSG_KEX_ECDH_REPLY

I had an issue in ubuntu 13.10 and 12.10 where attempting to connect to github (git clone / pull / push or anything) would fail with no output. I checked my /.ssh directory for config and any ssh ...
10
votes
1answer
23k 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 ...
10
votes
3answers
5k 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 ...
10
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.
10
votes
2answers
12k 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 this?...
10
votes
2answers
6k 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 ...
10
votes
3answers
7k 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: /usr/local/...
10
votes
3answers
12k 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
1answer
2k views

What does the filesystem cache do in Windows 7?

The Diagnosing why Git is so slow article has this interesting item in it: Enable the filesystem cache Windows' filesystem layer is inherently different from Linux' (for which Git's ...
10
votes
1answer
5k 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
3answers
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 git-...
10
votes
1answer
3k 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 ...
10
votes
0answers
530 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 ...
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
1answer
3k 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
1answer
4k 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 ...
9
votes
4answers
8k 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 no,...
9
votes
4answers
9k 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 ...
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
1answer
3k views

How can I recover from an accidental git push -f?

I just ran git push -f by mistake, thus overwriting a remote branch. Original: (remote origin:) branch master -> commit aaaaaaa branch foo -> commit bbbbbbb (local) branch ...
9
votes
2answers
4k 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
1answer
8k 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 ...