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

1
vote
1answer
502 views

“Git: command not found” error while installing RVM on OS X

Working from my command line on Mac OS X Snow Leopard in directory /Users/michael, I did the installation line recommended by the RVM site: bash < <(curl -s ...
6
votes
1answer
10k 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 ...
2
votes
1answer
57 views

Git: Work on a file that's on a branch other than HEAD's

Is there a way to work on a file that's on a branch other than the current branch without explicitly switching to that branch? I have an orphan branch that consists of notes, and another branch where ...
2
votes
1answer
744 views

Setup a git repository to be pushed to

I am honestly not sure how else to phrase the question but here is a better explanation. We have a Git server at work with all our projects. Now obviously I have pulled these repositories onto my ...
6
votes
1answer
541 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?
16
votes
3answers
27k views

How do I disable password prompts when doing git push/pull?

Every time I want to push and/or pull from the terminal (in Linux) I have to enter a password. How do I remove this so that it pulls and/or pushes without the password?
2
votes
2answers
544 views

Help Understanding Instructions for Setting Up Git on a Mac

I'm trying to install Git on a mac. I found these instructions: crainbandy But, I don't understand this bit. 1. Change directories to the mounted image bash$ cd /Volumes/Git\ 1.6.4.4\ Intel\ ...
11
votes
2answers
720 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 ...
1
vote
1answer
110 views

How do you keep your login information private when you push your code to GitHub?

I am using a shell script to automate the deployment of my website. I now want to push the code of this site onto GitHub, and now I am facing the problem that my login details will be publicly ...
2
votes
2answers
398 views

How to keep a clone of GIT updated?

I have created a GIT clone on my backup NAS: git clone --bare //NAS/GIT/TexRepo //backupnas/backup/GIT/TexRepo.git Now, continuing to work on the regular repository, what is the best way, practice ...
8
votes
2answers
2k views

gVim as git editor under cygwin

I use msysgit and I'd like to have gvim as my git editor. I use cygwin bash instead of git bash. Running $ /cygdrive/c/Program\ Files\ \(x86\)/Vim/vim73/gvim.exe starts gvim. But if I set this ...
1
vote
2answers
4k views

ssh-keygen command not found when setting up Git on Windows

I'm following the steps here. I'm on step 3 of Set Up SSH Keys. When I type in: ssh-keygen -t rsa -C "myemailhere" I get the response: ssh-keygen: command not found What is this supposed to ...
10
votes
2answers
10k views

Git: How to delete all untracked files?

I'm using Git for version control. Now I want to delete on my local machine all files in the repository that are not tracked. I can use git status to list these files, but how can I delete all of ...
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
1answer
899 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 ...
11
votes
1answer
5k 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 ...
1
vote
3answers
5k views

Git pulling without root access

On a Ubuntu Server 10.10 box, I seem to require root access to use git pull (in my /var/www directory). error: cannot open .git/FETCH_HEAD: Permission denied. I have tried chmodding 0777 /var/www and ...
7
votes
1answer
372 views

How to pull a git repo from github with all unlinked commits

I'm wondering how to pull a repo with all of the commits that have not been gc'd, if that is possible.. is it something like: $ git clone x $ cd x $ git fetch origin -f ? or something else?
1
vote
1answer
38 views

git archiving old folders

i have a big git repo with some old folders in there. i dont need them in my master branch and they are a little bit annoying there but i dont want to loose the data, so archiving would be great. now ...
3
votes
2answers
835 views

How does git track changes, why does it get confused? Because I do

I have a git repository on a Dropbox folder, shared between a Linux machine and a Windows machine. I try to sync only on the Windows machine, because I am aware of "issues" that may arise. ...
21
votes
2answers
13k views

Why can't I push an empty commit?

git commit --amend --allow-empty then git push origin master the git said that ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'remoteurl' To ...
1
vote
1answer
449 views

git fails to clone linux kernel

I tried to clone the linux kernel but it fails with the following output: ... remote: Counting objects: 2134058, done. remote: Compressing objects: 100% (334223/334223), done. Receiving objects: 100% ...
3
votes
1answer
170 views

Should I compile the linux kernel in the git repository itself?

This is about common practices. I have a git repository containing the linux kernel. Now I want to build this linux kernel. Should I copy the sources outside the git repository and then build the ...
1
vote
3answers
9k views

64-bit (x64/amd64) git client for Windows 7 [closed]

Is there a 64-bit command-line git client for windows (with precompiled binaries)? I have been using msysGit (32-bit) but it will not store files larger than 2GB. I hear that this restriction does ...
2
votes
1answer
694 views

eclipse: keyboard short cut not working

In eclipse - helios (Ubuntu 10.04), the git commit menu displays a keyboard short cut also - Ctrl+Alt+C. But this key combination will not activate this menu. How to use the keyboard short cut for git ...
5
votes
2answers
853 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 ...
1
vote
1answer
2k views

How to use Git Extensions with BitBucket/Mercurial repository?

I a have repository on both github.com and bitbucket.org, and I am very familiar with using Git Extensions for all repository functions on GitHub. When I started using bitbucket.org repo's I have to ...
3
votes
1answer
530 views

OS X File Permissions, File Sharing, and Git

Here's my setup: Mac Mini running Snow Leopard Sharing a folder with a bunch of code in it. The folder and everything in it is set for read/write access for both the main user and the "staff" group ...
0
votes
2answers
1k views

How do I make git use ssh-add (when necessary)?

On Linux (CentOS, in case that matters), I'm having a problem with git commands. git can take advantage of keys loaded into the ssh-agent cache, but if the keys aren't loaded, it doesn't seem to take ...
1
vote
1answer
2k views

Make msysgit work with cygwin ssh?

git-upload-pack errors occur when sshing into cygwin. sshd in cygwin does not take paths from .bash_profile as expected in a *nix environment. What is the way to remedy this and make msysgit work ...
44
votes
8answers
45k views

How should I set the PATH variable on my Mac so the Hombrew-installed tools are found?

Trying to set up Homebrew on a new Mac (on previous Macs I would install packages from source). The first package I tried to install was Git: $ brew install git Installation went OK, but which ...
1
vote
2answers
467 views

How do I merge a bulk number of commits at a time in GIT?

How do I merge a large number of commits in phases of, say, 20 commits at a time?
2
votes
1answer
618 views

Change where SSH looks for key files on Windows

By default, my ssh looks for private key identities in /.ssh/ when I connect. However, this is not a valid place in a Windows system. How can I permanently change the default place that it looks for ...
1
vote
1answer
1k views

Is there a way to use GitHub for Mac for GitHub remote and CLI for other remote?

The GitHub for Mac app says it'll only work with the Git origin remote. This means that it'll only work with one remote. My current remote is used to push to Heroku. Is there a way to set my origin ...
1
vote
0answers
52 views

How to setup Xcode's SCM for static and dynamic site content?

I want to use Xcode 4's SCM (GIT) to manage your static and dynamic site content, which I edit and maintain with a variety of tools (CSSEdit, Dreamweaver and Espresso). I have tried creating ...
0
votes
2answers
135 views

Do dVCS/git systems also manage incremental file changes

... or do they only manage full "commits"? (by full commits, I mean to say only the working/final files for a given snapshot.) I am needing to learn some kind of VCS as I venture into application ...
0
votes
4answers
4k views

How to install git on Mac without xcode?

On Mac. I have installed 'brew' using terminal, now I tried to install 'git' with the command: 'brew install git'. But terminal says "Now install Xcode: ...
0
votes
1answer
221 views

Equivalent of 'ssh' config option in Hg for Git?

On Windows 7, my .hgrc config file provides a nice an easy way to tell Mercurial about the private SSH key location with the following syntax: [ui] username = John Doe <jdoe@example.com> ssh = ...
3
votes
1answer
41 views

Is it possible to copy the remotes of origin to the local clone

Lets say I have a repository on a server somewhere (call it "origin") which has remotes pointing somewhere else (lets call that server "parent"). When cloning origin to my local PC, is there a way to ...
6
votes
2answers
4k 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 ...
1
vote
1answer
924 views

Git pull/fetch doesn't seem to work

I am using git over hamachi vpn and am able to clone the remote repository. However, git pull/fetch fails after hanging for a long time. The error message displayed is: Write failed: Broken pipe ...
6
votes
2answers
8k 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 ...
5
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?
1
vote
1answer
510 views

Can I recover history for a SVN repo from a local git-svn repo?

Our development team is currently using SVN to manage our web application development. The developer managing the SVN server is trying to migrate it from an older Win XP server to another server, but ...
2
votes
2answers
2k views

Move local copy of git in Github for Mac

I have cloned the source of a git repository to /path1/foo/, but I want move the local copy to a new location say /path2/foo/. How do I do this?
2
votes
1answer
1k views

Private Git Repository Using a VPN with Tinc, SSH, and Git

Would it be possible to set up a VPN using tinc as the VPN software on Ubuntu or Windows 7, and then connect from a computer (from outside the local network) to the computer hosting the VPN, in order ...
4
votes
1answer
1k views

gitosis with password authentication (don't want to use ssh-key)

I followed an online tutorial to setup gitosis on my LAN server and it's using ssh-key to authenticate now. All the tutorials I saw were using ssh-key authentication. I was wondering if I can use ...
2
votes
1answer
89 views

Merge master functionality into shared branches in Git

Suppose that I have several shared branches on my Git repository, for example: newfeature, experiment and gtkgui, and I share those branches in the origin repository. My team and I make some changes ...
3
votes
3answers
4k 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 ...
1
vote
1answer
180 views

git --interactive keybinding problem for left/right/delete

I am using zsh on my Mac and after some bindkey trickery I managed to get left/right/delete/backspace to work on zsh (and bash). In git --interactive, this does not work correctly though. When I try ...