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

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

How can I share a git stash?

Is there a way to share a stash in git? I work on a number of machines, and often want to be able to move my current working state from one to another. I'm looking for a way that I can push/pull a ...
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
2k views

How to upgrade to latest git on debian 7?

I have installed git through apt-get on debian 7 which gives me: # git --version git version 1.7.10.4 I would like to ugrade to the latests version of git. I have tried: sudo apt-get install ...
4
votes
2answers
2k 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
3answers
1k 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 ...
4
votes
1answer
6k 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
1answer
1k 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
83 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
3k 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
393 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
200 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
732 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
575 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
719 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
2answers
806 views

Remove all “deleted” files in Git

Is there a better solution for removing manually-removed files from the Git repository than my current error-prone command ? git status | grep deleted: | cut -d: -f2 | xargs git rm
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
302 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
3answers
3k views

git: Keep changelog for file when moving to a different repository

I am versioning my config files with git. Now I need to move some of my config files to a different repository, to achieve a clean structure. Is there a way I can keep the change log for a file if I ...
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
308 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
392 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
670 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
2answers
3k 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/ -> ...
4
votes
2answers
427 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
3k 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
3answers
268 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 ...
4
votes
1answer
697 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
2answers
1k 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 ...
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 ...
4
votes
1answer
2k views

git: branch not fully merged?

I am trying to delete a branch using gitbash and i get a error about the branch not being fully merged. Using TortoiseGit i merged, switch to master, tried merging again, commit then finally pull from ...
4
votes
1answer
147 views

Ubuntu insists on installing git 1.7

I had Ubuntu 12.04 LTS and I recently upgraded to 12.10. Though I already have git 1.8 installed, update-manager keeps trying to install git and git-man version 1.7 (which obviously fails)! Any idea ...
4
votes
1answer
3k views

Can't Install msysgit/tortoisegit

I ran msysGit-netinstall-1.7.0.2-preview20100407-2.exe.   (http://code.google.com/p/msysgit/downloads/list) Then I ran TortoiseGit-1.4.4.0-64bit.msi. ...
4
votes
1answer
427 views

Why every time I run gitk from a Mac OS X Terminal it opens in background?

Every time I run gitk from a Mac OS X Terminal it opens in background. In other words, gitk is always shown behind the Terminal window. Actually, gitk is the only tool manifesting this strange ...
3
votes
3answers
7k views

using puttygen generated public keys in unix environment? [duplicate]

Possible Duplicate: How to convert .ppk key to OpenSSH key *under Linux*? (unix, here: ubuntu 10.4) I know how to create ssh key pairs in unix (ssh-keygen) and how to do it in windows ...
3
votes
2answers
4k 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. ...
3
votes
3answers
220 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

git rewrite commit parent?

I have two commits based on some parent: P -> A -> B I'd like for them to be based on another parent: P' -> A' -> B' EDIT: My situation is that I'm working with other team members. We have a central ...
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 ...
3
votes
5answers
1k views

local git code browser

I want to have a frontend to my local git repository like github, so I can send my peers links to diffs. is there anything free that does this?
3
votes
1answer
941 views

How to revert a file in git, pulling from the index/stage?

Let's say I've staged a file, and then I'm working on that file and want to abandon those changes and pull the copy down from the stage again. How do I do that? I tried git reset HEAD but for some ...
3
votes
2answers
234 views

git: Get source so i can compile, not everything?

github has a download button which offers a download for .tar.gz and .zip files. Essentially i want the same thing for the latest branch or of a tag. I dont want to work on the project, i just want to ...
3
votes
2answers
2k 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. ...
3
votes
1answer
269 views

Does git commit --amend overwrite the old commit completly?

To a local repository I accidentally committed a file whit a password in it that should not go out to the public (it was there for a lazy testing purpose...). I saved the file again whit out the ...
3
votes
4answers
349 views

How to version control for a solo author creating non-programming documents?

I'm a writer, not a programmer. I'm just now for the first time learning about version control and how it works, and I am wondering how version control could streamline my workflow. For years, I've ...
3
votes
1answer
170 views

Git vs SVN: website storage efficiency [closed]

I know that SVN (Subversion) stores files' deltas in order to efficiently store data. Git however, is a little more complex. What I'm wondering is that if I were to store plain HTML, image and js ...
3
votes
1answer
2k 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. ...
3
votes
4answers
4k 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 ...