[ImageJ-devel] [Postcards] Bring Postcards up-to-speed (#1)

Johannes Schindelin Johannes.Schindelin at gmx.de
Thu Jul 4 23:32:54 CDT 2013


Hi Chris,

On Thu, 4 Jul 2013, Chris wrote:

> > On Wed, 3 Jul 2013, Chris wrote:
> > 
> >> Excellent!  Thank you Dscho!  I can certainly see my project in
> >> GitHub now.  I did a merge but I still do not understand how I can
> >> develop my project on my computer (MacBook Pro OS 10.7.5).  When I do
> >> a Clean and Build of my project in NetBeans, I still get the errors:
> >> 
> >> COMPILATION ERROR : 
> >> -------------------------------------------------------------
> >> Text_Tool.java:[41,27] error: package org.jdesktop.layout does not exist
> > 
> > This suggests to me that you still did not use GitHub for Mac and
> > still did not clone your own project with it. You will find that using
> > GitHub for Mac will tell you when you have local or remote changes,
> > and will help you reconcile them.
> 
> I am using GitHub for Mac.  I did a commit there, then tried to clean
> and build my project in NetBeans with the same results that package
> org.jdesktop.layout does not exist.

Well, making a commit means that you made local changes and recorded them
in the local repository.

However, you merged my changes in your repository on GitHub. So you have
to synchronize your local clone so the changes are reflected locally.

However, from your descriptions I suspect that you never cloned your
Postcards repository successfully to your computer.

Why don't you try that, by following the screenshots I sent in my previous
mail?

> >> so I still am missing the operation that pushes the project back to
> >> my computer with the correct repairs.
> > 
> > I bet nothing you read about Git calls this a "push". I bet all of
> > those articles call that a "pull" or a "fetch & merge".
> 
> OK, I confess I am new to GitHub and am unfamiliar with the terms and
> what they mean.

I fear that my comment was misunderstood. I meant to say that you would
probably better served by understanding the principles of Git first --
implying that you understand the lingo, such as: What is a commit? What
does it mean "to commit"? What *is* a repository? Why do I have to
synchronize local and remote repositories? What does it *mean* to
synchronize? 

So I encourage you to pay less attention to the screenshots and the labels
of the buttons but more to what the tutorials want to accomplish, i.e. why
do they want you to perform this or that action? Why are there changes
visible on the website you haven't seen, and: can you see them in your
local clone? If not, why not? And what is a "clone" anyway and why do you
need that? And what is the relationship between your clone and a "local
repository"? What is a "repository" anyway?

>  But I do not know where to look when the latest
> tutorials tell me to click buttons that do not exist and explain in
> great detail how GitHub differs from other resources I have never heard
> of, but fails to explain how to do the simplest things such as putting
> the project with its correct resources (whatever that may be called)
> into my computer so that I can run it without errors.  Now my Git for
> Mac has four pages: History, Changes, Branches, and Settings.  Nowhere
> can I see any way to update the project on my computer.  

First, please make sure that you cloned your project "Postcards" with
GitHub for Mac. If you did not, or if you are not sure, just re-clone it.

Of course, you could fix every issue with the existing setup you have if
you were a Git expert already, but you're in the process of getting there,
so let's keep things easy. If things did not work, re-do them instead of
trying to fix them.

> OK, it's well established that I don't know what I'm doing.  Reading the
> tutorials only helps when their instructions match what I see on my
> computer.

The purpose of those instructions are as much a cooking recipe ("do this
first, then that", etc) as descriptions what the steps are *about*. After
reading the tutorial on cloning, for example, you should have been
equipped with an idea what the results of the actions were, not just how
to click a button that says "Clone to Mac" that, oh BTW, is no longer
there.

> When the instructions depart from reality, I can no longer
> follow them, because each new step depends on the step before being
> accomplished, so if I can't accomplish a step due to it not being
> available on my machine, I can't go any further.

As I said, it is crucial that you understand *why* you are supposed to
perform those steps. When you do, you should be able to see that the
"Clone to Computer" button in the new GitHub for Mac does exactly what the
old "Clone to Mac" button on the old GitHub website did.

Which is... to clone your GitHub repository into a local repository with a
working directory.

And of course you need to understand the lingo of the tutorial to
understand what the meaning of those steps are. If you do not understand
the lingo, it *must* lead to confusion, such as: why does "git push" not
push the changes from the remote repository into the local one? If you do
not take care to learn the nomenclature of Git, you might think that "to
push" means to get remote changes and apply them to your local directory.
But that is not what Git means by "push", and therefore not what "git
push" does!

> There's no equivalent on my machine to "Clone in Mac."

That would be the "Clone to Computer" button in the GitHub *application*.
Not the GitHub *website*.

> The "Clone in Desktop" button puts me on the download GitHub for Mac
> page, which is already downloaded, so that is not helpful.

Since you did not mention the "Clone to Computer" button, I suspect that
you did not *start* the application after download. That is what the
download page intends to let you do, and that application is very helpful,
I can tell you, because I tried it (as the screenshots in my previous mail
prove).

> So after committing my project in Git for Mac, I have no idea what else
> I should do to make my NetBeans project useable without the
> org.jdesktop.layout errors.

Again, you need to understand what "to commit" *means* in order to
understand what happened to your repositories and working directories when
you did so.

"To commit" means that you record a new changeset into the local
repository's commit history.

> Is it possible to do something that will let me develop my project on my
> computer using NetBeans without the org.jdesktop.layout errors?

Yes. The Synchronize menu item I mentioned earlier when you clone the
repository using the GitHub for Mac application.

So far, it looks to me as if you performed a lot of steps, some of which
changed things in ways you did not intend, but it changed it nevertheless.
If you do not go back to doing things from the start, you will not be able
to repair the erroneous changes without the help of a Git expert sitting
directly beside you. Worse, you will prevent yourself from getting the
understanding of Git to use it without help from Curtis or myself.

So I encourage you to start over, clone your repository onto your
computer, re-import it into Netbeans. If that re-import fails, I trust you
to be able to interpret the error message and take according actions
before re-cloning and re-importing again until it works.

I also encourage you to take a look at the mail I sent earlier, in
particular the link to the commit that fixed the swing-layout issue. I
trust you will be able to understand the "diff" that is shown on that web
page, and to understand why it fixes the issues, and I also trust that you
will be able to make the connection between "org.jdesktop.layout" and
"swing-layout" and to understand what that groupId in the dependency that
I added *means*.

In short, I encourage you to stop following the instructions as soon as
you fail to understand *why* a certain step needs to be performed, or
*where* the button or menu item is to perform that step, and interrupt
following the instructions in order to search the documentation for
answers to the questions the instructions instigated. As soon as you
understand what Git is about, and what actions you need to perform to get
what you want, we will all have a much easier time to collaborate.

Ciao,
Johannes

P.S.: You do realize that bundling a .exe and using it for printing makes
your plugin non-portable?



More information about the ImageJ-devel mailing list