Do a "git export" (like "svn export")?

I've been wondering whether there is a good "git export" solution that creates a copy of a tree without the .git repository directory. There are at least three methods I know of: git clone...

How do I migrate an SVN repository with history to a new Git repository?

I read the Git manual, FAQ, Git - SVN crash course, etc. and they all explain this and that, but nowhere can you find a simple instruction like: SVN repository in:...

How do I clone a subdirectory only of a Git repository?

I have my Git repository which, at the root, has two sub directories: /finisht /static When this was in SVN, /finisht was checked out in one place, while /static was checked out elsewhere, like...

How to have 'git log' show filenames like 'svn log -v'

SVN's log has a "-v" mode that outputs filenames of files changed in each commit, like so: <pre>jes5199$ svn log -v r1 | jes5199 | 2007-01-03 14:39:41 -0800 (Wed, 03 Jan 2007) | 1 line Changed...

How do I fix a Git detached head?

I was doing some work in my repository and noticed a file had local changes. I didn't want them anymore so I deleted the file, thinking I can just checkout a fresh copy. I wanted to do the Git...

Using Git with Visual Studio

As a long-time Visual SourceSafe user (and hater) I was discussing switching to SVN with a colleague; he suggested using Git instead. Since, apparently, it can be used as peer-to-peer without a...

Hard reset of a single file

I currently have three modified files in my working directory. However I want one of them to be reset to the HEAD status. In SVN, I'd use svn revert &lt;filename&gt; (followed by svn update...

Undo a particular commit in Git that's been pushed to remote repos

What is the simplest way to undo a particular commit that is: not in the head or HEAD Has been pushed to the remote. Because if it is not the latest commit, git reset HEAD doesn't work. And...

git replacing LF with CRLF

Running git on a Windows XP machine, using bash. I exported my project from SVN, and then cloned a bare repository. I then pasted the export into the bare repositories directory, and did a: git...

How do I remove the passphrase for the SSH key without having to create a new key?

I set a passphrase when creating a new SSH key on my laptop. But, as I realise now, this is quite painful when you are trying to commit (Git and SVN) to a remote location over SSH many times in an...

Pushing an existing Git repository to SVN

I've been doing all my work in Git and pushing to GitHub. I've been very happy with both the software and the site, and I have no wish to change my working practices at this point. My PhD adviser...

Is it possible to cherry-pick a commit from another git repository?

I'm working with a git repository that needs a commit from another git repository that knows nothing of the first. Typically I would cherry-pick using the [email protected]{x} in the reflog, but because this...

How to git-svn clone the last n revisions from a Subversion repository?

Problem How do you create a shallow copy with git-svn from a Subversion repository, e.g. how do you pull only the last three revisions? The git clone command can get the last n revisions from a...

How do I 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...

Checkout remote branch using git svn

I have checked out a svn repository using git svn. Now I need to checkout one of the branches and track it. Which is the best way to do it?

Git for beginners: The definitive practical guide

Ok, after seeing this post by PJ Hyett, I have decided to skip to the end and go with Git. So what I need is a beginner's practical guide to Git. "Beginner" being defined as someone who knows how...

Should I use SVN or Git?

I am starting a new distributed project. Should I use SVN or Git, and why?

How to retrieve a single file from a specific revision in Git?

I have a Git repository and I'd like to see how some files looked a few months ago. I found the revision at that date; it's 27cf8e84bb88e24ae4b4b3df2b77aab91a3735d8. I need to see what one file...

Git workflow and rebase vs merge questions

I've been using Git now for a couple of months on a project with one other developer. I have several years of experience with SVN, so I guess I bring a lot of baggage to the relationship. I have...

In plain English, what does "git reset" do?

I have seen interesting posts explaining subtleties about git reset. Unfortunately, the more I read about it, the more it appears that I don't understand it fully. I come from a SVN background and...

How and/or why is merging in Git better than in SVN?

I've heard in a few places that one of the main reasons why distributed version control systems shine, is much better merging than in traditional tools like SVN. Is this actually due to inherent...

git-svn: how do I create a new svn branch via git?

I have a git repository which tracks an svn repository. I cloned it using --stdlayout. I created a new local branch via git checkout -b foobar Now I want this branch to end up in …/branches/foobar...

git-svn not a git command?

While attempting to get an old svn dump of a project under git control, I ran into an interesting problem. Whenever I run git svn, I get an error saying it isn't a git command, yet there is...

Resuming git-svn clone

I started cloning an SVN repository using the git-svn's clone operation. After about 6 hours of importing (it's a big repo), my computer went and slept on me. Is there a way to resume the...

What's the difference between "git reset" and "git checkout"?

I've always thought of git reset and git checkout as the same, in the sense that both bring the project back to a specific commit. However, I feel they can't be exactly the same, as that would be...

Is git-svn dcommit after merging in git dangerous?

My motivation for trying out git-svn is the effortless merging and branching. Then I noticed that man git-svn(1) says: > Running git-merge or git-pull is NOT recommended on a branch you plan > to...

git-svn: what's the equivalent to `svn switch --relocate`?

An svn repository I'm mirroring through git-svn has changed URL. In vanilla svn you'd just do svn switch --relocate old_url_base new_url_base. How can I do this using git-svn? Simply changing the...

How to move some files from one git repo to another (not a clone), preserving history

Our Git repositories started out as parts of a single monster SVN repository where the individual projects each had their own tree like so: project1/branches /tags ...

Git: How to update/checkout a single file from remote origin master?

The scenario: I make some changes in a single file locally and run git add, git commit and git push The file is pushed to the remote origin master repository I have another local repository that...

Git-svn and Eclipse?

Is there a plugin for Eclipse for git-svn? I'm looking for a way to handle the SVN repo with Git (for fast branch switching etc.)