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
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
8k 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
3answers
7k views

Git Syntax: How to archive a repository?

So I have a git repository on my local computer that I want to archive (zip is fine) and upload to my server. Once the file has been uploaded to the server, I will extract the archive. I don't need ...
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
3answers
5k views

How to execute commands as root in git post-receive hook

I just recently set up a remote git repo on a server for a web app running as an Upstart service. I'd like to use the post-receive hook to trigger actions that are required to update the application ...
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
2answers
13k 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
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
842 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/ -> ...
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
1answer
627 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
1answer
920 views

How to list every file for every revision in Git (like Mercurial's hg manifest --all)?

Mercurial has a command to list every file that the repository has for every revision: hg manifest --all Is there an equivalent command in Git?
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
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
2answers
16k 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
3answers
1k 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

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"] ...
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
8k 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
9k 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 ...
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 ...
5
votes
2answers
439 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
586 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
2answers
1k 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 ...
5
votes
1answer
698 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
899 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. ...
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
5k 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
1answer
1k 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 ...
5
votes
3answers
3k views

Using git, how do I go back to first commit then go through the history?

I cloned a project from Github and now I wish to revert it to the first commit, how would I do this? Also, once I am back to the first commit, how do I go up to the second commit, and then from the ...
5
votes
3answers
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
3k 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 ...
5
votes
1answer
354 views

How to store git repos of abandoned projects?

I have over 200 projects on my workstation, every one is a git repository. Most of them are superseded or otherwise abandoned. I still keep the code in case I ever need anything from them. Currently, ...