This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
it:git [2012/11/22 13:40] Alexander Rind subgit as alternative to git-svn |
it:git [2015/11/25 10:14] (current) Alexander Rind [Further Readings] Git lernen mit Beispielen |
||
---|---|---|---|
Line 30: | Line 30: | ||
- in Eclipse select File -> Import | - in Eclipse select File -> Import | ||
- then Git -> Projects from Git | - then Git -> Projects from Git | ||
- | - click "Clone" button | + | - Select Repository Source: "URI" |
- | - Clone | + | - Source Git Repository |
- | * URI: ''git@github.com:ieg-vienna/Prefuse.git'' | + | * URI: ''git@github.com:ieg-vienna/Prefuse.git'' |
- | * you don't need to change anything else! | + | * you don't need to change anything else! |
- | * leave user "git" and password ""! | + | * leave user "git" and password ""! |
- | - select branches: leave all branches selected | + | - Branch Selection: leave all branches selected |
- | - select a directory where Git should store local repositories | + | - select a directory where Git should store local repositories (only at first use) |
- | - this should be outside your Eclipse workspace directory! | + | * this should be outside your Eclipse workspace directory! |
- | - I use ''C:\Users\Rind\git'' | + | * I use ''C:\Users\Rind\git'' |
- | - Local Destination: accept default values | + | - Local Destination: accept default values |
- | - click "Next" button | + | - Setup Eclipse project |
- | - in the "Wizard for project import" select "Import existing project" | + | * If there are Eclipse project files in the repository; i.e. "Finish" is not grayed out. \\ Example: prefuse-vienna |
+ | - Import existing project | ||
+ | * Otherwise. \\ Examples: EvalBench, TimeBench, ieg-util, ieg-prefuse | ||
+ | - Import as general project | ||
+ | - close project in Eclipse | ||
+ | - manually copy eclipse.project to .project and eclipse.classpath to .classpath \\ If this does not work in Windows Explorer, the Windows Commandline or a [[http://notepad-plus-plus.org/ | good text editor]] can be used. | ||
+ | - reopen project in Eclipse | ||
+ | * The 3rd option (new project wizard) fails. | ||
__Note__: for contribution development EGit will be sufficient -- you do **NOT** need //Git for Windows// | __Note__: for contribution development EGit will be sufficient -- you do **NOT** need //Git for Windows// | ||
Line 65: | Line 72: | ||
git svn rebase | git svn rebase | ||
</code> | </code> | ||
+ | |||
+ | Might be relevant: [[http://stackoverflow.com/a/10762396/1140589 | git-svn to handle eol-style]] | ||
Alternative: http://subgit.com/ | Alternative: http://subgit.com/ | ||
+ | |||
+ | ===== Attach a new pull request to an existing issue on GitHub ===== | ||
+ | |||
+ | <code bash> | ||
+ | curl --user "alex-rind:XXXXX" \ | ||
+ | --request POST \ | ||
+ | --data '{"issue": "16", "head": "alex-rind:character-encoding", "base": "master"}' \ | ||
+ | https://api.github.com/repos/prefuse/Prefuse/pulls | ||
+ | </code> | ||
+ | |||
+ | XXXXX -> GitHub web password \\ | ||
+ | character-encoding -> branch name | ||
+ | |||
+ | Source: http://stackoverflow.com/questions/4528869/how-do-you-attach-a-new-pull-request-to-an-existing-issue-on-github#answer-4529172 | ||
+ | |||
+ | ===== Rename files throughout history ===== | ||
+ | |||
+ | <code bash> | ||
+ | git filter-branch --index-filter ' | ||
+ | git ls-files -s | \ | ||
+ | sed "s-\t.classpath-\teclipse.classpath-" | \ | ||
+ | sed "s-\t.project-\teclipse.project-" | \ | ||
+ | GIT_INDEX_FILE=$GIT_INDEX_FILE.new git update-index --index-info && \ | ||
+ | mv "$GIT_INDEX_FILE.new" "$GIT_INDEX_FILE" | ||
+ | ' HEAD | ||
+ | </code> | ||
+ | |||
+ | Source: http://www.fussylogic.co.uk/blog/?p=1250 | ||
===== Further Readings ===== | ===== Further Readings ===== | ||
- | * [[http://progit.org/book/ | Pro Git e-book]] -- i can recommend | + | * [[http://www.x3m.ch/files/Git%20lernen%20mit%20Beispielen.pdf | Git lernen mit Beispielen]] -- short tutorial in German; Markus W. recommends :-) |
+ | * [[http://progit.org/book/ | Pro Git e-book]] -- i can recommend :-) | ||
* [[http://book.git-scm.com/ | git community book]] -- i didn't read | * [[http://book.git-scm.com/ | git community book]] -- i didn't read | ||
* [[http://git-scm.com/course/svn.html | git crash course for Subversion users]] | * [[http://git-scm.com/course/svn.html | git crash course for Subversion users]] |
alex @ ieg: home about me publications research