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
1answer
6k views

Kaleidoscope for git difftool

I tried using kaleidoscope for git difftool to compare two branches. So I installed ksdiff and setted it like follow in my .gitconfig [diff] tool = kaleidoscope [difftool "kaleidoscope"] ...
6
votes
1answer
3k views

Where is my zsh getting its git completion settings?

My zsh does git completion, but I did not configure this myself. How can I figure out where these settings are coming from?
6
votes
6answers
15k views

SSL certificate verification failure in Chrome, Heartbleed bug?

For some reasons I'm running into SSL problems since a few days. When trying to clone a git repository for example I receive the following error message: fatal: unable to access 'https://someuser@...
6
votes
1answer
5k views

Undoing a git reset of multiple commits

I accidentally ran git reset HEAD~12 when I meant to run get reset HEAD~1. How can I recover the commits I just reset? About eight of the commits were pushed to a remote before the reset. The others ...
6
votes
3answers
5k views

Sync a forked repo with original using the Github for Mac GUI client and/or the Web interface?

I want to sync a repo I forked on Github with the original. Is there any way I can do that using only the Github for Mac client and/or the Web interface? If not, is there a GUI client (for Mac OS X) ...
6
votes
1answer
9k 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, ...
6
votes
4answers
10k 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 ...
6
votes
2answers
3k 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 ...
6
votes
3answers
6k views

git-receive-pack : command not found

I made a git repo on a local machine with "git init --bare" and added it as the remote origin on the project on my main computer with ssh: git add remote origin git@192.168.1.14:repoName.git I was ...
6
votes
1answer
6k 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 ...
6
votes
1answer
6k 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 ...
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
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
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 ...
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
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 ...
6
votes
2answers
14k 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 ...
6
votes
1answer
9k views

Rebasing a branch which is public

I'm failing to understand how to use git-rebase, and I consider the following example. Let's start a repository in ~/tmp/repo: $ git init Then add a file foo $ echo "hello world" > foo which ...
6
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 ...
6
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 ...
6
votes
1answer
853 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
4answers
7k 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/ -> /srv/...
6
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 ...
6
votes
3answers
4k 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 this?...
6
votes
1answer
654 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
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
7k 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
2answers
17k 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
4answers
10k 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
3answers
2k 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
3k 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
1answer
6k 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
9k views

How do I delete origin/master in Git

I cannot remove origin/master from my server. No idea why. The error message is the following remote: error: By default, deleting the current branch is denied, because the next remote: error: '...
5
votes
3answers
10k views

How to assess why git clone/fetch is so slow inside Hyper-V Server?

I have git installed on Ubuntu Server 12.0.4 and work in tandem with gitlab. Ubuntu itself is a virtual machine in Hyper-V Server 2012 R2. I'm comparing performance of command git clone git@my-server:...
5
votes
1answer
8k views

Why is there no “pathspec” when I try to remove a folder in Git?

I am trying to remove a folder from my Git repository with git rm folderToRemove but Git issues this error when I try to do so. fatal: pathspec 'siteFiles/applicationFiles/templates/folderToRemove'...
5
votes
2answers
441 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
3answers
602 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

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
2answers
2k 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 edit/...
5
votes
1answer
750 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
927 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. I'...
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
1answer
4k 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
2k 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 %USERPROFILE%/...