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
1k 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
515 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 ...
39
votes
8answers
41k 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
428 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
568 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
133 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
219 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
897 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
7k 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
2k 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
486 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
83 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 ...
4
votes
1answer
447 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 ...
2
votes
2answers
764 views

Git push from windows pc to aws ec2 machine fails

I've followed the steps in this tutorial: http://cuppster.com/2011/05/12/diy-node-js-server-on-amazon-ec2 but when I came to the step "push our local code changes to the remote repository" I got an ...
2
votes
1answer
257 views

How can I synchronize and backup a large number of git repositories?

I have a number of git repositories which I would like to keep synchronized and backed up. By synchronized, I mean that I work off of several different computers and want to always use the latest ...
1
vote
1answer
661 views

I need to connect to multiple git repos, so I have multiple ssh keys, how to auto add?

It seems if I reboot that my ssh settings get wiped out. I followed this tutorial to use ssh-add for the 2 other keys I need to get mapped. Should I run this command in my bash config so it gets run ...
2
votes
2answers
513 views

GIT Commit to FTP Site

I am working on a project where I only have FTP control of the server. I am basically hand deploying changes from GIT commits to the server. Is there any way to automate this (without writing the ...
6
votes
1answer
374 views

Go back in time and create branch?

I'm trying to do the following thing in git: Go back a few commits (master branch) Create a new branch Restore the latest commit on the master branch (go forward) The order is not important, it ...
1
vote
1answer
2k views

How to configure git to ignore spaces in detecting conflicts during a merge?

A lot of the conflicts git detects are lines or spaces, or coding style changes. Is there a way to ignore such differences?
1
vote
2answers
2k views

How to see the changes that were pulled on a `git pull`?

After (or before) doing a git pull, is there an easy way to see what the updates are that have been pushed by others to the branch I am working on?
1
vote
2answers
362 views

Find all files Added by git user

In git, how can I simply find all of the files that were added to a repository by a particular user?
0
votes
3answers
727 views

Can I use git to sync 2 external hard drives?

For those who don't know, Git is the most popular distributed version control system today. I have 2 Seagate FreeAgent hard drives. Is it possible in theory to sync both hard drives by using one of ...
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 ...
1
vote
1answer
219 views

Free versioning server

I know services like GitHub and BitBucket, but I need even a little but private space to do versioning (doesn't really matters if it's git, hg or svn). Years ago I subscribed to a service that gave me ...
28
votes
3answers
7k views

Tmux and ZSH custom prompt : bug with window name

I have customized my ZSH prompt with oh-my-zsh to make it more readable and add information about git if I'm in a repository. Example : bob@inf [~/docs] % bob@inf [~/src/nicest] master % (in a git ...
1
vote
1answer
131 views

what's the downside to leaving ascii files with LF line endings in Windows

I'm collaborating on a Git project that has developers on OSX, Linux and Windows. I've set my autocrlf setting to auto which means that it converts the line endings to CRLF as it pulls them down to ...
2
votes
2answers
223 views

Stop Git from Opening a new Terminal.app Window on Commit

Git is automatically opening a Terminal window when I save commit messages on my Mac. This might normally be useful (e.g. if the commit was initiated from a Terminal window), but I use iTerm as my ...
0
votes
1answer
381 views

missing tags after git svn rebase

I've set-up git to follow a SVN repository. Every time I want the latest changes from SVN I do git svn rebase That works fine. Now a tags directory has been created in SVN and a new tag is created ...
0
votes
2answers
157 views

Is there an alternative to ~ on bash?

My keyboard doesn't have a ~ key, and the Git Bash on Windows doesn't allow me to type that symbol with Alt-### combinations nor to paste it in. How can I do this?
0
votes
1answer
234 views

How to setup a dev branch in git?

A bunch of us are working on a shared repository and using git for collaboration and version control. We actually use gitolite in the backend. We felt the need to have a dev branch so that the ...
1
vote
6answers
556 views

navigate with bash

I'm very new to working with the terminal on my macbook pro and am trying to understand how to navigate into certain directories with it. I can't seem to get out of my username directory. I'm trying ...
3
votes
4answers
2k views

How to properly store dotfiles in a centralized git repository

I'd like to put all my dotfiles (like .profile, .gitconfig, etc.) in a central git repository, so I can more easily keep track of the changes. I did this, but I would like to know how to properly ...
3
votes
3answers
224 views

Explaining Git to someone new to revision control

I've recently decided to jump into the whole world of revision control to work on some open source projects I have. I looked around (subversion, mercurial, git, etc) and found that Git seemed to make ...
3
votes
1answer
1k views

Unable to connect to Github for the first time

This is my first time with Git and I'm trying to set it up on my box. I added my key to my profile in the Github web interface. When I try to connect... : max@linux-vwzy:~> ssh git@github.com The ...
2
votes
1answer
1k views

Why Git keeps track of changes in execution permission?

If you have a file added to a Git repository and you change the execution permission (e.g. chmod 0755 file), Git tells that file has changed. This can be useful, but sometimes is a pain in the neck ...
1
vote
1answer
63 views

Server site configuration of git

I've been trying to learn Git in the past two/three weeks. What port does Git run on by default? Is there a specific port to unlock on a home router to get outside commits working if the router is ...
28
votes
5answers
11k views

Can you specify git-shell in .ssh/authorized_keys to restrict access to only git commands via ssh?

I'd like to be able to use a ssh key for authentication, but still restrict the commands that can be executed over the ssh tunnel. With Subversion, I've achieved this by using a .ssh/authorized_keys ...
6
votes
1answer
2k views

How can I recover from an accidental git push -f?

I just ran git push -f by mistake, thus overwriting a remote branch. Original: (remote origin:) branch master -> commit aaaaaaa branch foo -> commit bbbbbbb (local) branch ...