How can I remove an SSH key?

Note that there are at least two bug reports for ssh-add -d/-D not removing keys: “Debian Bug report #472477: ssh-add -D does not remove SSH key from gnome-keyring-daemon memory” “Ubuntu: ssh-add -D deleting all identities does not work. Also, why are all identities auto-added?” The exact issue is: ssh-add -d/-D deletes only manually added keys … Read more

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

You’ve already discovered the simplest way to specify a shallow clone in Git-SVN, by specifying the SVN revision number that you want to start your clone at ( -r$REV:HEAD). For example: git svn clone -s -r1450:HEAD some/svn/repo Git’s data structure is based on pointers in a directed acyclic graph (DAG), which makes it trivial to … Read more

Pushing an existing Git repository to SVN

I needed this as well, and with the help of Bombe’s answer + some fiddling around, I got it working. Here’s the recipe: Import Git -> Subversion 1. cd /path/to/git/localrepo 2. svn mkdir –parents protocol:///path/to/repo/PROJECT/trunk -m “Importing git repo” 3. git svn init protocol:///path/to/repo/PROJECT -s 4. git svn fetch 5. git rebase origin/trunk 5.1. git … Read more

How to remove origin from git repository

Fairly straightforward: git remote rm origin As for the filter-branch question – just add –prune-empty to your filter branch command and it’ll remove any revision that doesn’t actually contain any changes in your resulting repo: git filter-branch –prune-empty –subdirectory-filter path/to/subtree HEAD

See changes to a specific file using git

Use a command like: git diff file_2.rb See the git diff documentation for full information on the kinds of things you can get differences for. Normally, git diff by itself shows all the changes in the whole repository (not just the current directory).

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

Create a users file (i.e. users.txt) for mapping SVN users to Git: user1 = First Last Name <email@address.com> user2 = First Last Name <email@address.com> … You can use this one-liner to build a template from your existing SVN repository: svn log -q | awk -F ‘|’ ‘/^r/ {gsub(/ /, “”, $2); sub(” $”, “”, $2); … Read more