git

How do I convert a git repository to mercurial?

I've been developing a java application using git as source code repository. I'd like to share the project with other java developers and hg seems to be most used by them. My question is how do I convert a git repository to hg? If I tried googling "convert git to hg" and every search hit is about converting from git to hg. I'm also us...

git rm multiple files that have already been deleted from disk

OK, say I have a git repo that I have deleted four files from using rm (not "git rm"), and my git status looks like this: # deleted: file1.txt # deleted: file2.txt # deleted: file3.txt # deleted: file4.txt How do I remove these files from git without having to manually go through and add each file like this: g...

amending a single file in a past commit in git

I want to fix a file in past commit. This might affect all ascending commits. Is there an easy way to do that? Can you give me a guideline of how to do that? Many times when I commit twice I find that I've had error in the first commit, and I wish to fix the error without having to 'git reset' my last good commit. For clarification. I...

Git: removing selected commits from repository

I would like to remove selected commits from a linear commit tree, so that the commits do not show in the commit log. My commit tree looks something like: R--A--B--C--D--E--HEAD I would like to remove the B and C commits. So that they do not show in the commit log, but changes from A to D should be preserved. Maybe by introducing a s...

Git error: fatal: unable to connect a socket (Invalid argument)

I've got msysGit (Git on Windows) working just fine on my home machine, but at work, where we are behind a Microsoft ISA proxy, I get the following error when I do a git clone: H:\>git clone git://github.com/akitaonrails/vimfiles.git Initialized empty Git repository in H:/vimfiles/.git/ github.com[0: 65.74.177.129]: errno=Invalid argume...

Converting a repository from git to subversion

Reasons for doing this aside, is there a reasonable way to convert an entire git repository to subversion? I can find only tons on information on migrating from subversion to git, and exchanging changesets between the two, but not for doing a simple conversion of the entire git repository to svn. ...

How do I omit certain files from the `git status` report?

I'm using git and developing in Python (although this is obviously relevant to any other data managed with git). How do I tell git I don't want to see all the .pyc files from python in git status? ...

What is the best way to handle configuration files with git?

Say my application has a configuration files in plain-text. They contain some sensitive information which is required to test the application in my dev environment. I use different OSes to access and work on my projects (win, mac, ... ). I do not wish some of the information in the configuration files to make it to my public git reposit...

Git plugin for Hudson checkout problem

When using the Git plugin for Hudson my job always fails when fetching the latest sources from my online git repository ( git://github.com/ithena/orm2dsl.git ) . The git plugin first executes git fetch succesfully. Then it tries to execute git checkout -f origin/ , which fails as shown below. Is this a problem with my git repository or ...

Is there a git-merge --dry-run option?

I'm merging in a remote branch that may have a lot of conflicts. How can I tell if it will have conflicts or not? I don't see anything like a --dry-run on git-merge. ...

Version control to coordinate with yourself

For programming in my spare time, I have both a desktop and a laptop (both Macs, though I doubt that makes a difference the question). I've got VMware on both of them, with Linux images to run my code on. They're identical images, so I've got the same environment in both places. The trick is that I like to use version control for ALL ...

Is it worth the effort to create pretty revision history in a DVCS?

I used to go back and edit my Mercurial commits to try to create a pretty history. I might have put two unrelated things into one commit, or I might have made several commits that were better understood as a single commit, but eventually it seemed like a waste of time and I got over the minor embarrassment of having less than perfect his...

Merging in changes from outside a git repository

I'm working with another developer on the other side of the country who is the lead on our project, and isn't using a formal version control system. On my end, I'm tracking all of my code in git. I've recently started contributing to the main project, and would like to be able to track updates from the other developer as well. When I ...

Can I store the .git folder outside the files I want tracked?

I have an unusual idea to use git as a backup system. So let's say I have a directory ./backup/myfiles and I want to back that up using git. To keep things clean I don't want to have a .git directory in the myfiles folder, so I thought I could create ./backup/git_repos/myfiles. From looking at the git docs, I've tried doing this: $ cd b...

Using Git with Visual Studio

As a long-time Visual SourceSafe user (& hater) I was discussing switching to SVN with a colleague; he suggested using Git instead, since apparently it can be used peer-to-peer without a central server (we just have a 3-developer team). I haven't been able to find anything about tools that integrate Git with Visual Studio, though - does ...

How do I view git diff with textmate

I have my editor setup to be textmate but when I do a git diff it uses vi to show me the diff output, is there any way to set it to show the diff in textmate? ...

What is the best way to git patch a subrange of a branch?

In Subversion, it is easy to merge a range of changesets/diffs from a branch using "svn merge -r a:b mybranch". But in git, I found it is only possible to cherry-pick a single commit from a branch to apply that patch to my current working branch. So I am wondering if there is a fast way to apply all the commits in one swoop between two t...

How would you include the current commit id in a git project's files?

So I've got an open source static javascript+html app that's deployed in about three different places right now, one on my local machine, one on an internal server, and one on a stable external server. I'd like to be able to tell immediately which version is deployed in which place, and I'd like bug reporters to have easy access to the ...

Importing an svn branch into git

I am new to git, and have a subversion repository that I want to be able to import into a git repository occasionally (for deployment). So I want to perform most of the updates using svn but wanted to see what's the best way to push it to git (just the default/master branch). ...

Git gets file hungry every once in a while...

I have a recurring problem with my Git repositories. I develop in Windows and my production site is under Linux. Several times it has happened that git was showing all files tracked as modified. I thought this was because of a conf issue or conflict between Windows and Linux, but then this morning, when I checked the Linux repo, it was s...