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

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
181 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
2answers
2k 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
2answers
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
858 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
3answers
1k 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
3k 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
2answers
2k 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 . ...
5
votes
1answer
3k 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
4k 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
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 ...
5
votes
1answer
995 views

Right and fast way to test git directory and git branch?

While trying to set up my new fish shell prompt, I ended up testing ways to get the branch name and also testing if I was on a git repository. I have found (1) git rev-parse --abbrev-ref HEAD, (2) git ...
5
votes
2answers
909 views

Eclipse: Help with EGit

I want to be able to use a version control system. Although Eclipse comes with CVS, I think it's better that I use a distributed version control system, such as GIT. I was pretty much sold after ...
5
votes
1answer
300 views

SSH freezing with ControlPersist on

I recently enabled ControlMaster and ControlPersist in SSH so that it reuses and multiplexes connections for speed. The config is: ControlMaster auto ControlPath /tmp/ssh_mux_%h_%p_%r ControlPersist ...
5
votes
1answer
233 views

How can I get SVN to recognize Mac Bundles as ASCII instead of Binary Streams?

I have a keynote file in which I am regularly editing the text, moving slides around, etc. There are a max of a few kilobytes of data changed in the internal .key XML file. However, SVN recognizes ...
5
votes
1answer
1k views

git gc out of memory

I have to clean-up my git repository with git gc. Unfortunately I do get a fatal out of memory error. ernst@samson:~/htdocs/stockdoo$ git gc Counting objects: 42368, done. Delta compression using up ...
5
votes
3answers
1k views

Jenkins notification-poll-build fail with “No git consumers for URI ssh://path”

Whenever my Jenkins gets notified about a new git commit to my repository foo, I get the following log/error response on the triggering client: Scheduled polling of foo No git consumers for URI ...
5
votes
3answers
905 views

Is there a way to redo a merge in git?

So I made a pretty big mistake. I made a commit, pulled, merged (but messed up the code while doing so) and then pushed. I'd like to redo that merge and get the code right. Is there any way to do ...
5
votes
0answers
396 views

Error from egit installation

Just installed a fresh 32 bit copy of java and eclipse. and am now trying to add egit for the first time. Following the instructions here (using the main repositiry) I receive this error when I try ...
5
votes
1answer
7k views

How to troubleshoot “remote end hung up unexpectedly” error in Git

I setup GIT in a Windows and a Ubuntu. Both of them works well locally. Now I want to put some repository from Windows to Ubuntu. I think I can use 'git push' in the Windows, or use 'git clone' in the ...
4
votes
5answers
4k 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 ...
4
votes
1answer
12k views

Git remote add doesn't work

I'm trying to add a remote server from my git bash prompt with something like: git remote add origin ssh://myserver.pair.com/usr/home/myname/myrepo.git fatal: Not a git repository (or any of the ...
4
votes
2answers
9k 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) ...
4
votes
2answers
6k views

Is Git Shell Windows Power Shell?

I have a simple question. What is Git Shell? IS it the same as Windows Power Shell? Because when I run Git Shell on my Windows 7 machine the Windows Power Shell is opened. Thanks for clarification. ...
4
votes
3answers
7k views

How to install the latest Git version on Ubuntu 10.10?

Synaptic just gives me version 1.7.1, but I want version 1.7.3 without the need to download and build from sources.
4
votes
2answers
110 views

when checkout a previous commit, Is there a quick way to input the log commit hash?

It's really tedious to type the following command: git checkout 622fe0a9b6bffdf4723026ae6e673245b510ac66 Is there autocomplete or shortcut to do this?
4
votes
2answers
10k views

gitosis: list all repositories

Is there a way to get a compact list of all git repositories managed by gitosis. I'm looking for something similiar to svn list url_to_repo I know that I can have a look at gitosis.conf, but ...
4
votes
2answers
14k views

Mac OS X Terminal get in Macintosh HD? For using Git and Github

I wanted to get started with using Git and Github especially for installing Web software to my htdocs directory. htdocs is the folder in which you put all your websites that then run by using MAMP -- ...
4
votes
2answers
3k 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. ...
4
votes
4answers
6k views

Why is Git falsely noting that my files are up-to-date?

I have 2 folders A and B in my file directory that link up to the same Git repository. I created a file in folder A called "index.html". I then create a different file also called "index.html" in ...
4
votes
2answers
5k views

Can checkout and track git branch, but cannot pull

So we have a branch in our git repo called creative_market. I run the command git checkout --track origin/creative_market which works fine. All of the changes that should be on the creative_market ...
4
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 ...
4
votes
1answer
3k 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?
4
votes
1answer
98 views

Using su with commands

Ubuntu Server 12.04 On a remote server that I ssh into I have set up a special user with: sudo adduser --system --disabled-login --disabled-password --group suser to run some maintenance functions. ...
4
votes
2answers
874 views

Can I delete my fork before the pull request gets accepted?

I made a fork of a project on github, did a small correction and submitted a pull request. However, from every pull request “in line”, I can see that this developer will take a long time before ...
4
votes
2answers
455 views

What to use for long term data archival?

I like to archive everything. Currently a small box of CDs holds most of my work and downloads from the past 15 years. Unfortunately, some of the CDs are starting to suffer bit rot, resulting in ...
4
votes
2answers
564 views

Which SCM is less disk intensive? (GIT vs SVN vs others)

I wonder which of the pouplar SCM's (especially I am interested in GIT, SVN) is less disk intensive. The thing is that, I was going to get an SSDisk (SSD) ) and they have limited write cycles. And I ...
4
votes
2answers
205 views

Understanding encryption Keys

I'm really embarrassed to ask this question but its the fact that I don't know anything about encryption. I always avoided it. I don't understand the concept of encryption keys (public key, private ...
4
votes
2answers
2k 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 ...
4
votes
3answers
766 views

To get Mail work for `git am`

I use Gmail and Mac's Mail for emails. It seems that you can use git am only with a terminal's Mail in OS X/Ubuntu. I apparently need to set up my ~/.mailrc such that # gmail account account gmail ...
4
votes
2answers
4k 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 ...
4
votes
2answers
925 views

Customizing Powershell to look like Github for Windows' shell

I use Github for Windows and usually I use the "Open a Shell" here command which launches powershell with some custom settings. It makes powershell display extra information when I'm inside a Git repo ...
4
votes
1answer
913 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 ...
4
votes
1answer
1k views

Is gitosis or gitolite necessary to push changes via HTTP/HTTPS to remote git repository?

I have an apache2 server running a virtual host with HTTPS and basic authentication enabled. The virtual host serves GIT repositories via gitweb script. Authenticated users pull repositories from ...
4
votes
1answer
2k views

git management - user rights

I have to set up git for a development team. The team members must have different rights. Some roles should have read rights only, some should be able to push but not to create new branches or tags. ...
4
votes
1answer
514 views

Restore Git from a local copy

We had a Git repo that was lost when the we forgot to back it up. One of us did a pull right before this happened and therefore has the latest code. Is it possible to rebuild the Git repo from a local ...
4
votes
1answer
2k 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 ...
4
votes
2answers
2k views

Setting up a git repository on a server

I read through the other git questions here but couldn't really follow whether they are trying to do the same thing as I am. So if you find any duplicates, please let me know. I have a central server ...
4
votes
2answers
451 views

Best way to share a git repo between home and work PCs?

I have a git repo on both my home and work computer. Both of these repos get pushed to a TFS server via git-tfs, but that's irrelevant. The big problem I'm having is because I can't just push to the ...
4
votes
2answers
437 views

Gollum-like wiki based on Mercurial

Is there a Gollum-like Wiki (Gollum uses a Git repo to store its pages) based on Mercurial (instead of Git)?