tweets

spotify

Git: oldcommit-split-preserve-timestamp   no comments

Posted June 15th, 2011 @ 07:30 in Uncategorized

Splitting a old git commit while preserving commit timestamps

hildenae@ick:~/tmp/wwsvntogit/WizardWars$ git rebase -i c2180
Stopped at be7755e... Comments
You can amend the commit now, with

	git commit --amend

Once you are satisfied with your changes, run

	git rebase --continue

hildenae@ick:~/tmp/wwsvntogit/WizardWars$ git reset HEAD^
Unstaged changes after reset:
M	parser/createSG/src/no/hig/rag/parser/BuildInitialSceneGraph.java
M	parser/createSG/src/no/hig/rag/parser/ColladaParse.java
M	parser/createSG/src/no/hig/rag/parser/GameObject.java
M	parser/createSG/src/no/hig/rag/parser/Main.java
M	parser/createSG/src/no/hig/rag/parser/MtlParse.java
M	parser/createSG/src/no/hig/rag/parser/ObjParse.java
hildenae@ick:~/tmp/wwsvntogit/WizardWars$ git commit -c be7755e -- parser/createSG/src/no/hig/rag/parser/MtlParse.java parser/createSG/src/no/hig/rag/parser/ObjParse.java
[detached HEAD 7b4ef13] Remove unused classes from createSG
 2 files changed, 0 insertions(+), 382 deletions(-)
 delete mode 100644 parser/createSG/src/no/hig/rag/parser/MtlParse.java
 delete mode 100644 parser/createSG/src/no/hig/rag/parser/ObjParse.java
hildenae@ick:~/tmp/wwsvntogit/WizardWars$ git commit -ac be7755e
[detached HEAD 1a6d313] Add javadoc comments and cleanup sourcecode
 4 files changed, 37 insertions(+), 48 deletions(-)
hildenae@ick:~/tmp/wwsvntogit/WizardWars$ git rebase --continue
Successfully rebased and updated refs/heads/master.

Referenses

  • http://book.git-scm.com/4_interactive_rebasing.html
  • http://manpages.ubuntu.com/manpages/maverick/man1/git-commit.1.html#contenttoc3

Written by Anders Einar on @ 07:30

Trekke ut deler av et git-repository, og samtidig ta vare på historie   no comments

Posted April 15th, 2011 @ 19:45 in bash,norwegian

Clone

git clone git@github.com:Kagee/fixmystreet.git
Initialized empty Git repository in /home/hildenae/tmp/fixmystreet/.git/
remote: Counting objects: 10461, done.
remote: Compressing objects: 100% (3306/3306), done.
remote: Total 10461 (delta 6802), reused 10276 (delta 6713)
Receiving objects: 100% (10461/10461), 10.10 MiB | 497 KiB/s, done.
Resolving deltas: 100% (6802/6802), done.

cd fixmystreet/

ls
android  bin  commonlib  conf  db  iphone  LICENSE.txt  locale  notes  perllib  README.pod  t  templates  web  web-admin

ls android
Fix My Street  README.txt  Screenshots  TODO.txt

Do some magick

git filter-branch --subdirectory-filter android -- --all
Rewrite 33db13154330e9e7a33c0fb5c356eccb25a6edda (36/36)
Ref 'refs/heads/master' was rewritten
Ref 'refs/remotes/origin/master' was rewritten
Ref 'refs/remotes/origin/cities_release_1' was rewritten
WARNING: Ref 'refs/remotes/origin/master' is unchanged
Ref 'refs/remotes/origin/migrate_from_osgb36_to_wgs84' was rewritten
Ref 'refs/remotes/origin/migrate_to_catalyst' was rewritten
Ref 'refs/remotes/origin/reportemptyhomes' was rewritten

ls
Fix My Street  README.txt  Screenshots  TODO.txt

Change origin

git remote -v

origin	git@github.com:Kagee/fixmystreet.git (fetch)
origin	git@github.com:Kagee/fixmystreet.git (push)

git remote set-url origin git@github.com:Kagee/fiksgatami.git git@github.com:Kagee/fixmystreet.git

git remote -v

origin	git@github.com:Kagee/fiksgatami.git (fetch)
origin	git@github.com:Kagee/fiksgatami.git (push)

Push

hildenae@hildenae-laptop:~/tmp/fixmystreet$ git push origin master
Counting objects: 464, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (243/243), done.
Writing objects: 100% (464/464), 1.44 MiB, done.
Total 464 (delta 159), reused 428 (delta 158)
To git@github.com:Kagee/fiksgatami.git
 * [new branch]      master -> master

Written by Anders Einar on @ 19:45

Food from heaven   no comments

Posted February 16th, 2011 @ 13:30 in Uncategorized

Potato salad, roast beef, fried onions and pickles

Written by Anders Einar on @ 13:30

Tagged with

Enabling VNC and disabling desktop effects from the command line   1 comment

Posted February 5th, 2011 @ 12:38 in bash,code,english

Don’t you just hate those day when you really need to access the desktop of a machine, but forgot or just never activated remote desktop?
Read more »

Written by Anders Einar on @ 12:38

SyntaxHighlighter Evolved with inline-highlight   no comments

Posted July 12th, 2010 @ 03:00 in code,english,php,wordpress

After i first posted code for highlight-range i made some small changes to the code in the post as i found better ways of doing things. When i inserted new lines it messed with my highlighting. Inspired by pastebin.com, i wrote a couple of lines that let me specify with a marker in the code (and not by line-number) what line should be highlighted.

Update: Added @hr@ for inline-ranges.
Read more »

Written by Anders Einar on @ 03:00

SyntaxHighlighter Evolved with highlight-range   1 comment

Posted July 7th, 2010 @ 19:08 in code,english,php,wordpress

Update: As of SyntaxHighlighter Evolved v. 3.0.0 this functionality is included in the plugin.

One of the first plugins i installed for this brand new WordPress was SyntaxHighlighter Evolved. I love to code, and knew i would find a use for it. To test it i used a large C++ file from cpp.snippets.org and began testing.

Highlight worked fine, but i i didn’t support highlighting a range of lines. This might not be so useful, as you usually want to highlight small sections, but i rewrote syntaxhighlighter.php to support ranges.

Read more »

Written by Anders Einar on @ 19:08

Using BankID (norwegian type) in Ubuntu 10.04   no comments

Posted July 6th, 2010 @ 22:08 in bash,code,english

Update: As of Ubuntu 10.10 this should not be nessesary, as OpenJDK in Ubuntu >= 10.10 should work with BankID.

In Ubuntu 10.04 (and probably onwards) OpenJDK Java and the Icedtea java plugin are the standard Java toolkit. BankID works with OpenJDK (just try installing Opera 10.10. Opera pre 10.5 use OpenJDK directly, without Icedtea), Icedtea is the troublemaker.
Read more »

Written by Anders Einar on @ 22:08