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

4
votes
2answers
416 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 ...
5
votes
1answer
6k 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 ...
2
votes
2answers
718 views

How to disable the git pager but just for certain commands?

I like having the pager enabled for git log for example, but not git diff because I have my own visual diff tool that comes up, and I hate having to hit 'q' at the command line after the diff is done ...
9
votes
2answers
4k 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 ...
0
votes
1answer
936 views

How do you set the repositories path in gitosis?

I'm setting up gitosis on a NearlyFreeSpeech.net account with a "virtual" Python. I tried to clone the gitosis-admin.git repository. The command below doesn't work. $ git clone ...
3
votes
1answer
999 views

How to revert a file in git, pulling from the index/stage?

Let's say I've staged a file, and then I'm working on that file and want to abandon those changes and pull the copy down from the stage again. How do I do that? I tried git reset HEAD but for some ...
6
votes
5answers
2k views

Is there any way to hook saving in Vim up to commiting in git?

I am new to the world of Vim, and I want to make it so that every time I save a file it is commited to version control. Is this possible?
3
votes
3answers
312 views

Polish before git merge?

I want to merge user branches into master, however, do some code review & modification before the merge commit. For example: o---o---o---o---o master \ o---o---o lucy Generally, git ...
6
votes
2answers
203 views

Git branch for instances of a website?

I'm working in a couple of websites, both websites needs almost the same code except for some changes in images and css, or settings. I'm just finished to read the chapter of branchs of Pro Git book ...
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 ...
1
vote
1answer
365 views

How to build a custom command with options

I want to make a command on my Mac to do the following: git add . git commit -m CUSTOM_COMMEND_BY_COMMAND git push cap deploy I seem to be calling those very often. I was wondering what's the best ...
3
votes
2answers
476 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 ...
2
votes
2answers
12k views

fatal: Not a git repository (or any of the parent directories): .git (And yet the repository exists)

I'm following the instructions on importing an existing .git repository to GitHub. When trying to add the .git repository to GitHub, I get the following error: fatal: Not a git repository (or any ...
8
votes
3answers
6k 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?
2
votes
1answer
421 views

Scheduled Push Changes To Local Git Repository (Ubuntu)

Boring Background - Summary: I know we're not using GIT properly!. This started as a small hobby project and has spiralled - my company uses Git to track/manage changes to a bespoke web-based software ...
7
votes
1answer
3k 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 ...
2
votes
1answer
68 views

Trying to push only key commits to git server

I have a git repository on a server. I can pull or clone copies from it. In a working copy, I want to create a branch and do some work. So far so standard. While doing that work, I may well perform ...
2
votes
2answers
2k views

On Mac OS X with HomeBrew, is there any advantage to installing Git via .dmg rather than via HomeBrew?

If a Mac OS X user already has HomeBrew installed, is there any advantage to installing Git via the .dmg files for OS X linked from the Git download page rather than via HomeBrew?
1
vote
1answer
158 views

Lost Git bundle in Textmate?

I'm not sure what happened here but I seem to have lost the git bundle in Textmate? I thought I might have accidentally removed it, but when I reinstall it, it still doesn't show up in my bundle list? ...
2
votes
1answer
1k views

sh.exe and ls significantly slower than usual on MSYS bash and GIT

I use MSYS Git and have the MSYS shell installed. I run Windows XP. All of the sudden basic tasks like runnig ls take many many seconds (>7 seconds) in the Git Bash shell or in the MSYS shell. ...
3
votes
2answers
342 views

Ubuntu - Problem with SCP / Git / Rsync

I'm having a really weird problem. For some reason, I can't scp, rsync, git pull or git push files larger than 1406 bytes. I can clone an entire repo no problem. I have no idea how to troubleshoot ...
8
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 ...
3
votes
2answers
2k views

CAN get online but CAN'T ping/curl/use GIT from command line

I've recently begun to use GIT repositories for Node.js, Socket.io, websockets, etc. The specific project isn't important here, what is is I'm unable to connect anywhere outside of localhost using the ...
3
votes
1answer
851 views

Disable specific git commands in a particular repository?

Three times recently, I've done really stupid things while using git. Twice I've run git reset --hard on my home-directory repository. The first time I fat-fingered a reverse-history search in my ...
3
votes
1answer
2k 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 ...
3
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 ...
0
votes
2answers
2k views

cygwin git status and tortoise git commit show different changes

On my Win7 Pro 64-bit machine I have TortoiseGit and cygwin with git. If I try to find the pending changes I do get different results from cygwin and TortoiseGit. I'm sure the result of cygwin git is ...
5
votes
1answer
4k views

Git log alias - fatal: ambiguous argument '%ad': unknown revision or path

I'm trying to use Git Immersion's log alias: [alias] hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short but Git responds with fatal: ambiguous argument '%ad': unknown ...
5
votes
1answer
5k views

How can I squash commits in git?

I want to simply squash a bunch of git commits that are no longer needed. I attempted to follow documentation from this site, but I ended up with git saying there is nothing to squash. I only have one ...
2
votes
1answer
954 views

git - recover deleted files from a prior commit

I accidentally deleted some files in a prior commit and would like to recover them. How can I do this? I ran this and found exactly what I was looking for: git whatchanged --diff-filter=D At the ...
40
votes
5answers
46k views

How to reset master to origin/master?

Can I do following in a simpler way? git checkout origin/master git branch -D master git branch master git checkout master
5
votes
1answer
2k 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 ...
57
votes
3answers
43k views

Using Multiple SSH Public Keys

I have a personal account and a company account on Unfuddle. On Unfuddle SSH keys can only be used on a single account, so I need to create a seperate SSH key on my laptop for both accounts. I ran ...
1
vote
3answers
180 views

Adding “manually versioned” project to git repository

Back before I had heard of the wonders of version control, I kept projects in folders like "project x 1.0", "project x 1.1", "project x 1.2", etc. There's tons of redundancy in this approach, so I'd ...
2
votes
1answer
2k views

git: get current working dir

How I can get current working dir from console using git? something like: if I'm in: ~/projects/someproject/somesubfolder/, the console command should say /home/va1en0k/someproject/ (if there is a ...
1
vote
2answers
230 views

Backing up code on an FTP server

I have a web hosting service, I want to store my code on it. I was thinking perhaps opening a Git repo for the entire dev/ directory and somehow in the Git hooks make it upload only the files that ...
8
votes
2answers
1k 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 ...
4
votes
2answers
9k 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
1answer
1k views

git svn fails with fatal error

While moving our svn repository to git I got the following error message: $ git svn clone svn://abraham/eeschweiz -s Initialized empty Git repository in ...
1
vote
1answer
179 views

Running git on shared host

I have a non-sudo account on a shared host. I want to be able to run the git-core for version control. I have another server that I am using for the git-repo. How can I install a version of git ...
4
votes
2answers
2k views

How do I create a cron job that will commit my project changes to git on a weekly basis

I'm using git for the purposes of making a historical transcript of the changes made to my project. I understand it's not the ideal usage but it's the usage pattern I've chosen for various reasons ...
0
votes
1answer
972 views

Installing Gitosis on EC2/Ubuntu

I'm trying to get gitosis to work on my Ubuntu instance on EC2. I'm having a problem with getting the right key to work. I SSH to my server using the key provided in the AWS console: it's a public ...
0
votes
1answer
343 views

compiling git on HP-UX

I'm trying to compile git on an HP-UX system. and when i run make all, I get a syntax error on line 252. if i go to line 252 of the makefile, i see uname_O := $(shell sh -c 'uname -o 2>/dev/null ...
0
votes
2answers
300 views

Easy way to create repo with submodules from folder containing git repos as subfolders

My case is ~/Library/Application Support/TextMate/Pristine Copy/Bundles there I have some bundles/folders which are all git repos. If I create git repo at Bundles folder, which will be the ...
8
votes
1answer
8k 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 ...
0
votes
1answer
969 views

GNU sort and git blame

Today I thought I was doing a simple operation: git blame file | sort -k 3 To get all the lines of file sorted by the date on which they were last changed. Unfortunately it doesn't seem to be ...
10
votes
1answer
5k views

git: how can i config git to ignore file permissions changes

I have some git projects in a linux server. i use Mac and linux to do my programming. the problem is that the mac filesystem's permissions doesn't really work well like in linux so all the files ...
4
votes
4answers
721 views

GIT not cloning on FreeBSD?

I'm running a FreeBSD 8.2 server with GIT 1.7.4.1 Attempting to clone anything, like $ git clone https://github.com/joyent/node.git node ends up, quickly, giving me this Cloning into node... ...
0
votes
1answer
438 views

Using git with cgit for decentralized/centralized development

I plan to use git for hosting my projects on my server. I've read about cgit, git-daemon, and I more or less decided to use those tools. But general use is still kind of confusing for me. What do I ...
1
vote
1answer
946 views

How to commit a change to a homebrew formula?

I made a change to some homebrew formula which fixes an issue I had. I also opened an issue to get that fix into the repository. But no one has responded yet. Now I want to update my homebrew ...