Month: June 2009

Adding Eclipse Project to Git

I did an earlier post where I did this, but I felt like it was sloppy.  Also, I did not add files to be ignored.  So, here is how to add an existing Eclipse project to Git:

Step 1:  In a terminal, change directories to your Eclipse workspace and project (assuming it is called my-project)

cd ~/workspace/my-project

Step 2: intialize the repository

git init

Step 3: add any files you want to ignore — consider any test data that might contain real production data and also consider connection information

vi .git/info/exclude

Assuming you have an Apache Derby database called db, you would exclude all of the database and the log with the following two lines:

db
derby.log

If you want to exclude Eclipse specific files, you may choose to add the following two lines:

.classpath
.project

Step 4: Add your files to your new Git repository

git add .

Step 5: Commit your files to the repository

git commit -m "My-Project inital code"

Step 6: Tag your code with a version

git tag v1.0

Update: You may want to tag this way so other developers see your tag (thanks Dominic):

git tag -a -m "GIT v1.0" v1.0

Now, your git repository is created and contains the code from your Eclipse project.

Resources

Ubuntu 9.04

I finally upgraded to Ubuntu 9.04  last weekend.  My wireless card quit working.  I tried several things like reinstalling the broadcom driver and all, but it wouldn’t work in Ubuntu 8.10.  I thought “”what would it hurt”, I will probably have to reinstall anyway.

The upgrade went with no problems, but it still didn’t fix my wireless problem.  I finally determined that my problem was with the network-manager and not my driver because I could see it with ifconfig.  So, I completely removed the network-manager, rebooted, and reinstalled.  Still no luck.  So, I was sitting on the couch programming with no Internet, and it just started working again!

I have noticed a few things working better!  First, when I do my dual screens, I noticed that it now places my Applications bar on the laptop screen.  Before, it didn’t seem to matter how I switched to dual screens, it would place my Applications bar on the other monitor.

Resources

Thread used for info on reinstalling network-manager

Adding a Project to Git and Google Code

This started because I wanted to share a program I had been working on through Google Code.

First, I created the git repository by:

skp@pecan:~/app/workspaces/pscompare$ cd ProjectSarah/
skp@pecan:~/app/workspaces/pscompare/ProjectSarah$ ls
bin  derby.log  export.xml  lib  src  timedb
skp@pecan:~/app/workspaces/pscompare/ProjectSarah$ git init
Initialized empty Git repository in /home/skp/app/workspaces/pscompare/ProjectSarah/.git/
skp@pecan:~/app/workspaces/pscompare/ProjectSarah$ git add .
skp@pecan:~/app/workspaces/pscompare/ProjectSarah$

Then, I did a commit:

skp@pecan:~/app/workspaces/pscompare/ProjectSarah$ git commit -m “First Release”Created initial commit 87fa855: First Release
196 files changed, 3456 insertions(+), 0 deletions(-)
create mode 100644 .classpath
create mode 100644 .project
create mode 100644 bin/com/skp/ProjectSarah/ChangeClientButton.class
create mode 100644 bin/com/skp/ProjectSarah/ClientListener.class
create mode 100644 bin/com/skp/ProjectSarah/CreateTimeViewExcel.class
create mode 100644 bin/com/skp/ProjectSarah/CreateTimesheetsButton.class
create mode 100644 bin/com/skp/ProjectSarah/DateField.class

Now, I created a new directory and started following these directions.  One of the problems I had was logging in.  I had to use the “My Profile” link on the upper right hand corner of Google Code.  That showed what my username was, and then, the password was on the Settings tab.

mkdir ~/app/git-workspace
cd ~/app/git-workspace
git svn clone –username <username> https://project-sarah.googlecode.com/svn/trunk
cd trunk
git fetch ~/app/workspaces/pscompare/ProjectSarah/
git branch tmp $(cut -b-40 .git/FETCH_HEAD)
git tag -a -m “Last fetch” last tmp
INIT_COMMIT=$(git log tmp –pretty=format:%H | tail -1)
git checkout $INIT_COMMIT .
git commit -C $INIT_COMMIT
git rebase master tmp
git branch -M tmp master
git svn dcommit

Now, I was able to browse the source of my program online!

Resources

git branch tmp $(cut -b-40 .git/FETCH_HEAD)

CupCake is Here!

As I was driving home, my phone finally asked if I wanted to install an update.  I had been reading about Android 1.5, and I was ready for that update!  My understanding is that this is the update that was called Cupcake.

I noticed an immediate difference as the phone was starting up.  The logo screen was different as it booted.  I feel like I have a new phone because everything looks different!  Many people say looks don’t have any value, but it did something for me.  I haven’t had time to play with it much, but I did notice the Camcorder application and I had a chance to see the virtual keyboard pop up.

Gnome Keyring Password Issue

I just upgraded my desktop to Xubuntu 9.04, and my Gnome Keyring password quite working.  This meant that I could not connect to wireless with the network manager.

So, I deleted the file $HOME/.gnome2/keyring/default.keyring.  I had to reenter the passwords, but this was no problem because it is a Desktop that is only on one network.

Hope it helps someone else.

Resources