git

How to setup distributed version control in a company

From my experience with distributed version control systems (DVCS) like git and mercurial in open source projects, most setup models use a centralized setup for their project (think GitHub). When introducing distributed VCS into a company, do you have a centralized setup model? ...

How can I get emacs to revert all unchanged buffers when switching branches in git?

Often, when I switch branches in git, if the files are open in emacs, then emacs asks if I want to revert them (as it thinks they've changed on disk) even though the contents are identical. Firstly I'd like to find a way for emacs to not ask me about it at all if the contents on disk are identical to those in the buffer. Secondly I'd l...

What are some of the best SCM practices?

I have been using Git for some time now to manage my own personal projects. I didn't really think about how I used it. I usually commit all the changes whenever there is a milestone not really thinking. But after reading a blog post that mentions how you should right your commit messages, I realized that I don't really know how to prope...

relocating the .git folder

I don't think this is possible without a bit of hacking but just throwing it out there. In Git is it possible to relocate the bulk of the .git folder (/objects i assume) to another location. I am having a problem without my current hard drive filling up with git and i want to be able to move it to a separate hard drive to free up space....

How do I clear my local working directory in git?

How can I clear my working directory in git? ...

git add error : "fatal : malloc, out of memory"

When i attempt to do a git add i get the error "fatal : malloc, out of memory". i imagine the system has ran out of memory obviously but is there a way to get around this. Also i am running windows server 2003 and using msysGit. EDIT: After more searching around i think its a problem with the packing of git, apparently their compressio...

Eclipse + Git - what does "staged" mean?

Hello! After working for some time with SVN I decided to try git with my new django project and installed the plugin for it into eclipse. I made a new pydev project and added django initial project files to the src directory. Then I "shared" the project to Git, added and commited all files. Now I have strange problems - all files exce...

Tracking 3rd party code with Git

Hi, I can't seem to grok the different solutions I've found and studied for tracking external code. Let alone understand how to apply them to my use case... Would you guys be so kind to shed some light on this and help me with my specific use case? What would be the best solution for the following, concrete problem? (I'm not gonna atte...

How to get the git commit count?

I'd like to get the number of commits of my git repository, a bit like SVN revision numbers. The goal is to use it as a unique, incrementing build number. I currently do like that, on Unix/Cygwin/msysGit: git log --pretty=format:'' | wc -l But I feel it's a bit of a hack. Is there a better way to do that? It would be cool if I actua...

Elevator pitch for Git a/o DVCS

Imagine you have a friend on the phone (not VoIP) who asks: "What's so special about Git? I'm fine using Subversion." What would be your "elevator pitch" in order to describe the advantage of using a DVCS like Git? ...

Mapping between git committers and SVN users

I'm using git-svn to store a "staging" version of some SVN repo, where other users are allowed to pull from this staging repo and commit there changes back to it, then the commits on the staging repo are periodically committed the upstream SVN repo. I want to know if there's a way to map between the git committers' names and SVN userna...

How to run Git 1.6.x for Windows from a USB memory stick

I would like to run Git 1.6.x for Windows from a USB memory stick. There is a Windows version of Git available at: http://code.google.com/p/msysgit/ Installing and running it from the local harddisk c:\ was absolutely no problem. However, I was not able to find out how it can be run from a USB memory stick. This post suggests that one ...

Git - dealing with mixed encoding filenames

I have a repository that has windows (cp1252) and linux (utf8) committers. Obviously Git gets confused, and puts invalid (from linux's perspective) filenames. I know I can use hooks to rename the files in one side (on linux's side, for instance, renaming the files from cp1252 to utf8 when they come and the reverse when they go), but ... ...

How do I debug git-cvsimport? (can't see complicated commit)

About 40 minutes ago I committed a particularly complicated change involving several file renames, mergers, and deletes from git into cvs, using git-cvsexportcommit. This went fine, and a checkout from CVS sees the changes. However, the changes are not appearing when I run git-cvsimport to update my git mirror of the CVS repository. I...

Git pull error: unable to create temporary sha1 filename

Hi everyone, I've got a small git repo setup with the only real purpose to be able to develop locally on several machines (work, home, laptop). Thus I have one branch and I commit/push once I leave a computer, pull once I sit down at the next. Has worked fine, up to now that is. Now when I pull on my 'live test' machine, I get the follo...

How do I compare two git repositories?

I've got two different exports of our CVS repository into git. They diverge at some point, and I'm doing some investigation into why. The development line goes back several years and over tens of thousands of commits. At the beginning of the development line, the SHA1 IDs for each commit are identical, telling me that git-cvsimport is...

Can I use mSysGit and Cygwin's git?

After migrating to Windows, I'm using msysgit with its included bash shell, and that's working well for me. But I have issues: our ant build process won't run in that shell, I'd like to use Cygwin's xterms instead of the Windows command window, since the terminal compatibility isn't good enough to run everything else I'd like in that wi...

git how to undo changes of one file?

I have a git repository, After the last commit, I modified a bunch of file. but I want to undo the changes to one of these file, as in reset it to the same version of itself that's in the repository, but I want to undo the change to that file alone! nothing else with it. How do I do that? assuming it's possible of course .. ...

What are the good criteria for committing changes to repository?

Hello, I'm currently using git for managing several projects, however, one question has been bugging me recently: what is the good tone for committing modifications to the master branch and to secondary branches? Should it be 'commit when it compiles', 'commit when it works', or something else? Thanks. ...

What are some standard setups people are using to work with GitHub?

In other words, how do people work with Git? I just finished uploading my first project and it was far from being a straightforward task, anyway once the thing is up and running what would be a good configuration? I cannot see how people could rely on the GitGUI or command line for their professional development work or worse code stra...