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

5
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 ...
5
votes
1answer
2k views

How can I visualize Git Flow branches?

I use the Git Flow workflow. But I can't generate a good-looking log in tree graph. The size is too small and won't show all the branch relationships like in the Git Flow chart. How can I create a ...
5
votes
3answers
689 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 ...
5
votes
1answer
838 views

Right and fast way to test git directory and git branch?

While trying to set up my new fish shell prompt, I ended up testing ways to get the branch name and also testing if I was on a git repository. I have found (1) git rev-parse --abbrev-ref HEAD, (2) git ...
5
votes
2answers
5k views

Getting remote git commit log without local copy

I want to get a copy of the commit log from a remote GIT repository without cloning/pulling it to my local machine and using only SSH. Is this possible? For example, I want to do something like: git ...
5
votes
2answers
885 views

Eclipse: Help with EGit

I want to be able to use a version control system. Although Eclipse comes with CVS, I think it's better that I use a distributed version control system, such as GIT. I was pretty much sold after ...
5
votes
1answer
276 views

SSH freezing with ControlPersist on

I recently enabled ControlMaster and ControlPersist in SSH so that it reuses and multiplexes connections for speed. The config is: ControlMaster auto ControlPath /tmp/ssh_mux_%h_%p_%r ControlPersist ...
5
votes
1answer
213 views

How can I get SVN to recognize Mac Bundles as ASCII instead of Binary Streams?

I have a keynote file in which I am regularly editing the text, moving slides around, etc. There are a max of a few kilobytes of data changed in the internal .key XML file. However, SVN recognizes ...
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 ...
5
votes
3answers
1k views

Jenkins notification-poll-build fail with “No git consumers for URI ssh://path”

Whenever my Jenkins gets notified about a new git commit to my repository foo, I get the following log/error response on the triggering client: Scheduled polling of foo No git consumers for URI ...
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 ...
4
votes
1answer
12k views

Git remote add doesn't work

I'm trying to add a remote server from my git bash prompt with something like: git remote add origin ssh://myserver.pair.com/usr/home/myname/myrepo.git fatal: Not a git repository (or any of the ...
4
votes
2answers
5k views

Is Git Shell Windows Power Shell?

I have a simple question. What is Git Shell? IS it the same as Windows Power Shell? Because when I run Git Shell on my Windows 7 machine the Windows Power Shell is opened. Thanks for clarification. ...
4
votes
2answers
8k 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) ...
4
votes
4answers
771 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... ...
4
votes
3answers
7k views

How to install the latest Git version on Ubuntu 10.10?

Synaptic just gives me version 1.7.1, but I want version 1.7.3 without the need to download and build from sources.
4
votes
4answers
3k 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 ...
4
votes
2answers
103 views

when checkout a previous commit, Is there a quick way to input the log commit hash?

It's really tedious to type the following command: git checkout 622fe0a9b6bffdf4723026ae6e673245b510ac66 Is there autocomplete or shortcut to do this?
4
votes
2answers
10k 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
2answers
4k views

Can I use git to version control psd files and maya projects?

I've had great success with git, version controlling, sharing and collaborating on my programming projects, and would love to do the same with photoshop .psds, illustrator .ais and maya projects. ...
4
votes
2answers
3k 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. ...
4
votes
4answers
6k 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 ...
4
votes
1answer
9k 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 ...
4
votes
6answers
1k views

Emacs + git: auto commit every 5 minutes

How can I set up emacs to automatically git commit every time I save an open file or periodically?
4
votes
2answers
3k views

How do I use installed Vim in Git Bash instead of the one that came with Git?

I've installed Vim and Git to C:\Program Files (x86)\(vim|git) respectively. When I run Vim from Git Bash, it runs the internal version of Vim that came with the Git installer. Is there a way to ...
4
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 ...
4
votes
1answer
2k 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?
4
votes
1answer
90 views

Using su with commands

Ubuntu Server 12.04 On a remote server that I ssh into I have set up a special user with: sudo adduser --system --disabled-login --disabled-password --group suser to run some maintenance functions. ...
4
votes
1answer
1k 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 ...
4
votes
2answers
4k views

Can checkout and track git branch, but cannot pull

So we have a branch in our git repo called creative_market. I run the command git checkout --track origin/creative_market which works fine. All of the changes that should be on the creative_market ...
4
votes
2answers
432 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 ...
4
votes
2answers
521 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 ...
4
votes
2answers
202 views

Understanding encryption Keys

I'm really embarrassed to ask this question but its the fact that I don't know anything about encryption. I always avoided it. I don't understand the concept of encryption keys (public key, private ...
4
votes
3answers
758 views

To get Mail work for `git am`

I use Gmail and Mac's Mail for emails. It seems that you can use git am only with a terminal's Mail in OS X/Ubuntu. I apparently need to set up my ~/.mailrc such that # gmail account account gmail ...
4
votes
2answers
833 views

Customizing Powershell to look like Github for Windows' shell

I use Github for Windows and usually I use the "Open a Shell" here command which launches powershell with some custom settings. It makes powershell display extra information when I'm inside a Git repo ...
4
votes
1answer
866 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 ...
4
votes
1answer
1k views

Is gitosis or gitolite necessary to push changes via HTTP/HTTPS to remote git repository?

I have an apache2 server running a virtual host with HTTPS and basic authentication enabled. The virtual host serves GIT repositories via gitweb script. Authenticated users pull repositories from ...
4
votes
1answer
2k views

git management - user rights

I have to set up git for a development team. The team members must have different rights. Some roles should have read rights only, some should be able to push but not to create new branches or tags. ...
4
votes
1answer
443 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 ...
4
votes
1answer
2k 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 ...
4
votes
2answers
2k views

Setting up a git repository on a server

I read through the other git questions here but couldn't really follow whether they are trying to do the same thing as I am. So if you find any duplicates, please let me know. I have a central server ...
4
votes
2answers
421 views

Best way to share a git repo between home and work PCs?

I have a git repo on both my home and work computer. Both of these repos get pushed to a TFS server via git-tfs, but that's irrelevant. The big problem I'm having is because I can't just push to the ...
4
votes
2answers
429 views

Gollum-like wiki based on Mercurial

Is there a Gollum-like Wiki (Gollum uses a Git repo to store its pages) based on Mercurial (instead of Git)?
4
votes
1answer
702 views

Is there a way to commit changes to remote server from within gitx?

Trying to get my head around git, github and gitx but struggling a little. Wondered if I am missing anything, but I can not seem to find a way to commit to remote server.
4
votes
1answer
4k views

git can't add files, sees changes

I have an existing project, deployed to heroku and under git control. I've been regularly adding and committing code. I recently rebuilt the computer I'm working on (OSX, 10.6) and now when I invoke ...
4
votes
2answers
448 views

Which version control should I use for my configuration files?

I want to store some of my configuration files (~/.emacs.d/, .Xdefaults, etc. linux $HOME stuff) in version control so I can easily sync them with my notebook/workplace and see my past changes and ...
4
votes
1answer
4k views

How to make git to work with pagent(putty) on Windows?

I'm using Windows x64 and I'm not able to make msysgit to work using pagent authentication. Here are some details: Putty is working without pagent without any problems. I have only one key loaded ...
4
votes
1answer
988 views

Adding Git Bash Here (right click) option with silent install

I want to install git silently. But this machine will be developer machine. So I need to have right-click "git bash here" option. I do that "git.exe /VERYSILENT" but it loads git as default. What is ...
4
votes
1answer
370 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 ...
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 ...