[ImageJ-devel] GitHub for Mac, was Re: Copy Plugin directly to Plugins folder.
Curtis Rueden
ctrueden at wisc.edu
Thu Jun 27 14:56:45 CDT 2013
Hi Chris,
> I need instructions on how to do steps B through E.
You already have the clone on your workstation. You wouldn't have been able
to push the README otherwise. You probably ran "git init" which actually
*creates* the repository on your workstation, and then you ran "git push"
which mirrors it back to GitHub. So you don't need to clone in that case;
you already have a copy of the repo, since the workstation is where you
created it.
Step (D) is "git commit"
Step (E) is "git push"
The book and other Git tutorials have more information.
You are already really close -- you have the code on your local
workstation, you have a GitHub repository already in existence, you have a
local Git repository linked to that remote repository, so all you have to
do is commit and push.
The errors you mentioned yesterday were because your local Git repository
had the wrong URL for the GitHub remote. That's why I asked you to check
the output of "git remote -v". It should say your origin is "
https://github.com/ad1054/Postcards". If it says "Hello-World" that is
wrong. To fix, try this:
git remote rm origin
git remote add origin https://github.com/ad1054/Postcards
Or, as Johannes says: just reclone from your GitHub remote into a new
directory, and then copy your files into there, and then commit and push
using the GitHub for Mac GUI.
Don't worry about "screwing anything up" because you can always just delete
and recreate the repository. It's not like you're going to lose hundreds of
hours of work, here.
Regards,
Curtis
On Thu, Jun 27, 2013 at 2:07 PM, Chris <chris at gaiag.net> wrote:
> Hi Chris,
>
> > following the instructions at
> > https://help.github.com/articles/fork-a-repo doesn't work .
>
> The article you want is:
> https://help.github.com/articles/create-a-repo
>
>
> I did this article and created the README yesterday, which created a
> Hello-World folder on my computer with a .git and a README file. I
> couldn't commit or push the commit due to the errors I sent you yesterday
> (remote origin already exists). But that article is only about creating a
> repo and creating and pushing a README file. It says nothing about cloning
> to my local workstation.
>
> *not* the one on forking a repo. The forking article is when you want to
> make a copy of someone *else's* repository and work on your copy of it. In
> your case, it is your own repo that you control. So you need to:
> A) create the repo on GitHub (you did this already)
> B) clone it to your local workstation (that's what "git clone" does; you
> can also do it via GitHub for Mac or other UI)
> C) hack on the local copy on your workstation
> D) commit your changes, which is like taking a snapshot so you don't lose
> work
> E) push your commits back to the remote server, so others can see what you
> did
>
> Pushing your changes back to GitHub is also nice in case your computer
> explodes, so you don't lose any work. You won't even lose the *history* of
> your work since the entire thing is there on the server. (And the entire
> thing is there on you local workstation -- that's why it's called a
> "clone").
>
>
> I need instructions on how to do steps B through E.
>
> > I'm still lost and do not want to start trying things without knowing
> > what I'm doing.
>
> I strongly suggest you take the time to read up on Git so that you have a
> basic understanding before you flail around too much. It will save you a
> lot of frustration.
>
> http://git-scm.com/book
>
> Regards,
> Curtis
>
>
> Thanks, Curtis, I will definitely study this.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-devel/attachments/20130627/f5c095b0/attachment.html>
More information about the ImageJ-devel
mailing list