Skip to content

Instantly share code, notes, and snippets.

@gerjantd
gerjantd / cmd.sh
Created April 15, 2012 07:41
Subversion: how to get all changed files between two revisions
#!/bin/sh
svn log -vqr x:y | egrep '^ +[ADM] ' | sort | uniq
@gerjantd
gerjantd / gist:2401548
Created April 16, 2012 21:13
My Git Workflow
http://osteele.com/archives/2008/05/my-git-workflow
My Git Workflow
Git‘s great! But it’s difficult to learn (it was for me, anyway) — especially the index, which unlike the power-user features, comes up in day-to-day operation.
Here’s my path to enlightment, and how I ended up using the index in my particular workflow. There are other workflows, but this one is mine.
What this isn’t: a Git tutorial. It doesn’t tell you how to set up git, or use it. I don’t cover branches, or merging, or tags, or blobs. There are dozens of really great articles about Git on the web; here are some. What’s here are just some pictures that aren’t about branches or blobs, that I wished I’d been able to look at six months ago when I was trying to figure this stuff out; I still haven’t seen them elsewhere, so here they are now.
@gerjantd
gerjantd / gist:2436686
Created April 21, 2012 11:24
Github: fork your own repo
http://bitdrift.com/post/4534738938/fork-your-own-project-on-github
1. Create a new repo named bar at github.com
2. git clone https://[email protected]/gerjantd/foo.git bar
3. cd bar
4. vi .git/config
replace foo with bar
@gerjantd
gerjantd / gist:2436691
Created April 21, 2012 11:26
Git: reset to previous commit
1. git clone https://[email protected]/gerjantd/foo.git
2. cd foo
3. git log --pretty=oneline
ed63ee6e036f1a0093e0b5b42a63a37ab69e4bc4 Merge branch 'master' into harebrained
f48e2f81555b4bbefb40e262da4d83d6814b80ea Added bugfix2
34290bce3f0fda000195eaf7fa2fc197d8e872de Added crazy and silly
dc2e9d8e358b1693d3374fb5452e434ef788a940 Added bugfix1
228662ad192fae2b4736b8bba3d7566fc201a74c Redirecting
@gerjantd
gerjantd / gist:2436695
Created April 21, 2012 11:27
Git: simple branch and merge example
git clone https://[email protected]/gerjantd/foo.git
cd foo
gitk
vi bugfix1
git status
git add bugfix1
git status
gitk
git commit -m "Added bugfix1"
gitk
@gerjantd
gerjantd / dwr20.dtd
Created April 22, 2012 17:44
DWR DTDs to cache in Eclipse XML Catalog User Specified Entries
<?xml version="1.0" encoding="UTF-8"?>
<!-- This is the DTD for DWR v2.x -->
<!--
Top level conviguration element.
-->
<!ELEMENT dwr (
(init?), (allow?), (signatures?)
)>
@gerjantd
gerjantd / gist:2465765
Created April 22, 2012 18:02
Github: API v1 call for retrieving my public gists (obsolete)
wget -O `date +%Y%m%d`-gerjantd-public-gists.json http://gist.github.com/api/v1/json/gists/gerjantd
Format the downloaded json:
sudo apt-get install libjson-perl
sudo apt-get install curl
curl http://gist.github.com/api/v1/json/gists/gerjantd | json_xs
Automate cloning of all gists:
@gerjantd
gerjantd / gist:2497278
Created April 26, 2012 07:44
Eclipse regexp: search and replace
To change this
vraag1.info
vraag2.info
vraag3a.info
vraag3b.info
into this
question.info.1
@gerjantd
gerjantd / gist:2498743
Created April 26, 2012 10:49
Git: split a previous commit
If you accidentally combine multiple changes into one commit, here's how to split it. You will need this if you wish to merge the changes seperately; cherry-pick operates on commits.
admin@STAMMETJEVM ~/My Documents/git/gerjantd
$ git clone https://[email protected]/gerjantd/foo.git
Cloning into 'foo'...
remote: Counting objects: 301, done.
remote: Compressing objects: 100% (178/178), done.
remote: Total 301 (delta 59), reused 301 (delta 59)
Receiving objects: 100% (301/301), 152.94 KiB, done.
Resolving deltas: 100% (59/59), done.