git

Git: How to clone the first commit?

Could anyone tell me how to clone the first commit? I don't want to delete recent commits, just make a clone copy of the initial state so I can grab some of the files. ...

TeamCity build does not run new XUnit tests

I'm using TeamCity 5 with Git VCS and Visual Studio 2010 SLN build runner. My solution has a class library proj containing a number of XUnit 1.5 tests. The post build event on this project runs the tests $(SolutionDir)libs\XUnit-1.5\xunit.console.exe $(SolutionDir)MyTestProj\$(OutDir)\MyTestProj.dll This works fine for running all my ...

git svn dcommit error: unable to determine upstream SVN information

hi there I m trying out git svn and I m getting this error Waht I ve done so far is git svn init -T <my svn repo> then I ve been committing to my git repo with git commit -a then once i did a few of those I did a git svn fetch and then i tried a git svn dcommit however, that fails with Unable to determine the upstr...

Is there a way to limit the amount of memory that "git gc" uses?

I'm hosting a git repo on a shared host. My repo necessarily has a couple of very large files in it, and every time I try to run "git gc" on the repo now, my process gets killed by the shared hosting provider for using too much memory. Is there a way to limit the amount of memory that git gc can consume? My hope would be that it can t...

Git push origin master returns Error cannot spawn ... why?

I'm trying to use GitHub for the first time, but after many issues trying to get the authentication right, I've managed to authenticate with [email protected] and created a repo, but when i try "git push origin master" i get the following error: $ git push origin master error: cannot spawn : No such file or directory fatal: unable to fork ...

Is there any distributed revision control system that supports partial checkout/clone?

As far as I know all distributed revision control systems require you to clone the whole repository. For this reason is it not wise to put huge amounts of content into one single repository (thanks for this answer). I know that this a not a bug but a feature, but I wonder whether this is a requirement for all distributed revision control...

I'm trying to merge two different branches, but git tells me that everything is up-to-date

I'm a git noob, and I know I'm missing something fundamental here. I've got three branches: master, feature1 and feature2. No two branch is identical, yet any attempt to merge from one branch to the other results in an "up-to-date" message. As you can imagine, I've done my work on feature1 and feature2, and now I just want to merge that ...

Git merge driver problem.

Hi, I'm trying to get git to allow me very manual merges due the way my code is (long story, it is explained here). I almost got it the way I wanted, just something missing in a specific situation. Shouldn't be too hard: I've got the custom driver to use WinMerge with something likec:/wm/winmerge.exe $1 $2 $3 (into c:/wm/wmrg.sh), git c...

git rename/delete confusion

I having one confusion about a particular git behavior: Following are the steps and situation (the list of commands are also given later): I have two branches: master and XBranch There is a file src/a.txt in both of them. It's content is "Old Content" In XBranch I rename src/a.txt to src/b.txt, using: mv, git rm, git add. In master r...

Git-svn: managing mutiple remote tracking branchs

Hi all, Currently I'm trying out exporting Git repository history into svn via git-svn and using grafts method. As of now, I have successfully export the git history into svn. But because of the grafting method and that my git repository is cloned from the actual repository, I ended up having TWO remote branches like that of below. o-...

How to use my changes for merge in git?

How do I force "my changes" when merging in git? Someone put all bin directories in git and now I have a terrible merge conflict :( Now it says the following: When you have resolved this problem run "git rebase --continue". If you would prefer to skip this patch, instead run "git rebase --skip". To restore the original branc...

Finding where source has branched from git

I have a git repository (covering more or less project history) and separate sources (just a tarball with few files) which have forked some time ago (actually somewhere in 2004 or 2005). The sources from tarball have undergone quite a lot of changes from which I'd like to incorporate some. Now the question is - how to find out what was ...

How can I easily fixup a past commit?

I just read amending a single file in a past commit in git but unfortunately the accepted solution 'reorders' the commits, which is not what I want. So here's my question: Every now and then, I notice a bug in my code while working on an (unrelated) feature. A quick git blame then reveals that the bug has been introduced a few commits a...

Start with git or svn ?

Hello Now I make every time a zip file of all my files to make backups. But then I heard about svn und later I read that git is "better" than svn. Can someone suggest me with which I should start learning? ...

Git - discard added files

Seems like this should be super-simple but looking around for a simple (or half-way straightforward) solution seems impossible: Say I add a bunch of files to a Git project. "git status" now says: # On branch master # Untracked files: # (use "git add <file>..." to include in what will be committed) # # Classes/FileA.h #...

Migrating from Subversion to Git

I have a lot of pre-existing projects and code in a few different Subversion repositories. I am planning on getting my toes wet with Git by migrating a few of the easier/soon to be multi-developer projects to Git. I have a few questions: If I start with a hosted Git solution, is it hard to change the Git server of a project (In Subvers...

gitosis: same user multiple machines

In git/gitosis a single ssh key is stored with the filename the same as user name. i.e. myusername.pub If I want to access a repository from many machines, must I make a new user from each location or is there a way to have multiple ssh keys for a single user. ...

Adding Folder/Subfolders/files in Git

How can I add a folder recursively, with its subfolders and its files? When I use git add folder_name, only that folder is getting added. git status now shows the files under the subfolders are shown as new files and untracked. For example, in Rails application, inside the Rails project folder, there are many folders: app public db ...

Is git's merge conflict resolution more efficient than other SCMs and merge tools?

Is git's merge conflict resolution inherently more efficient than other SCMs (CVS,Subversion,etc.), and also standalone merge tools? If so, why? Clarification: here I'm more interested in the algorithm itself - is it any different from a plain diff3 method? Some tools claim to be smarter in that(e.g. Guiffy), is it worth plugging one in...

What do ++ and +- mean in a Debian diff file?

I'm currently viewing the Ubuntu Rhythmbox source diff, (you can view this via gzip -d < rhythmbox_0.12.8-0ubuntu6.diff.gz | less on the command line). Here's an excerpt: +diff --git a/plugins/status-icon/status-icon-ui.xml b/plugins/status-icon/statu s-icon-ui.xml +index a5cb6e1..a4eee9d 100644 +--- a/plugins/status-icon/status-icon-ui...