using git

109 views
Skip to first unread message

Gary Frederick

unread,
Nov 29, 2012, 12:42:15 PM11/29/12
to app-inventor-o...@googlegroups.com
I would like to see some documentation on using git.

Some examples and what happens would be nice.

For example:

  • clone a repository and then make a local copy
  • make a branch and then use it
  • merge the branch back with my repository
  • update my repository with MIT changes
  • work with tags

I am perhaps doing all the above but not well. 

Gary

Rkipper Kelley

unread,
Nov 30, 2012, 4:52:34 PM11/30/12
to app-inventor-o...@googlegroups.com
Sounds like great agenda ideas. 

I was successful in setting up AI with Windows 7 and Java 6.  I can run and build successfully.  I plan to get it into eclipse Saturday and try to integrate with Github so I will be ready for Sunday with questions in hand. If I can come up with any good ideas for agenda I will check back here and post them. 

Rkipper

Gary Frederick

unread,
Nov 30, 2012, 4:59:09 PM11/30/12
to app-inventor-o...@googlegroups.com
:-)

I set up my git, got the source from the MIT version, set up a local version on my PC
and then built with the command line tools.

The eclipse setup looks pretty straightforward. I used Eclipse with the old source that was on the Google project repository.

Looking forward to the next hangout.

Gary


Jos Flores

unread,
Dec 1, 2012, 6:04:23 AM12/1/12
to app-inventor-o...@googlegroups.com
Hey guys,

this is an awesome resource to learn both the basics of git and also
how to use github: http://try.github.com/levels/1/challenges/1

Would be cool if people could give this a go before tomorrow!

cheers,
José
> --
> You received this message because you are subscribed to the Google Groups
> "App Inventor Open Source Development" group.
> To post to this group, send email to
> app-inventor-o...@googlegroups.com.
> To unsubscribe from this group, send email to
> app-inventor-open-so...@googlegroups.com.
> Visit this group at
> http://groups.google.com/group/app-inventor-open-source-dev?hl=en.
>
>

Gary Frederick

unread,
Dec 1, 2012, 6:43:48 AM12/1/12
to app-inventor-o...@googlegroups.com
I did the tutorial.

On Saturday, December 1, 2012 5:04:23 AM UTC-6, Jos wrote:
Hey guys,

this is an awesome resource to learn both the basics of git and also
how to use github: http://try.github.com/levels/1/challenges/1

Would be cool if people could give this a go before tomorrow!

cheers,
José


On 30 November 2012 21:59, Gary Frederick <g...@jsoft.com> wrote:
> :-)
>
> I set up my git, got the source from the MIT version, set up a local version
> on my PC
> and then built with the command line tools.
>
> The eclipse setup looks pretty straightforward. I used Eclipse with the old
> source that was on the Google project repository.
>
> Looking forward to the next hangout.
>
> Gary
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "App Inventor Open Source Development" group.
> To post to this group, send email to
> app-inventor-o...@googlegroups.com.
> To unsubscribe from this group, send email to

Jose Mª Martin

unread,
Dec 1, 2012, 10:40:17 AM12/1/12
to app-inventor-o...@googlegroups.com


Ok Jose, luego miro de hacerlo a ver que tal.

Rkipper Kelley

unread,
Dec 1, 2012, 9:53:22 PM12/1/12
to app-inventor-o...@googlegroups.com
That was a great Tutorial, thanks. I am ready for tommrow, just let me know what time you all think you can meet. I get how to make changes and commit and branch though I am having trouble simply getting the remote Repo added. I think it will make for a good lesson tommorow.
Rkipper

On Thursday, November 29, 2012 12:42:15 PM UTC-5, Gary Frederick wrote:

Jos Flores

unread,
Dec 2, 2012, 4:47:28 AM12/2/12
to app-inventor-o...@googlegroups.com

Sounds good!
Let's aim for noon EST; I should be back home then, 5 GMT.

Cheers,
José

--
You received this message because you are subscribed to the Google Groups "App Inventor Open Source Development" group.
To post to this group, send email to app-inventor-o...@googlegroups.com.
To unsubscribe from this group, send email to app-inventor-open-so...@googlegroups.com.

Rkipper Kelley

unread,
Dec 2, 2012, 8:35:08 AM12/2/12
to app-inventor-o...@googlegroups.com
Sounds good, noon EST. 

Rkipper

Rkipper Kelley

unread,
Dec 2, 2012, 10:59:23 AM12/2/12
to app-inventor-o...@googlegroups.com
Here is where I am, wanted to go ahead and post in case anyone wanted to make any suggestions to what I am doing wrong or we can wait till noon.
 
My AI source is in C:\GitHub\appinventor-sources
I do not have a Remote Repository created on GitHub for it. I did but when I tried to remote add origin it kept telling me the origin name already existed.  I read somewhere to delete the remote if I got this message.

What I did do already.

In the local directory I did without quotes, “git init” and added all files with “git add .”
Next I did “git  -am “Initial Commit”
Next , I thought I was supposed to add a remote origin. Maybe this is where I am going wrong.

“git remote add origin g...@github.com/rkipper/AppInventor_rk.git

I kept getting message – remote origin name already exists (or something similar)

Now my local status of directory says, “Your branch is ahead of ‘origin/master’ by 1 commit. Nothing to commit, working dir clean.

Am I supposed to create the Remote Repo before I try to remote add origin and do I have to call the Local and Remote the same name?

I think getting started  with both the local and remote is the most confusing to me. I understand the work flow after that such as branching.
 
 

On Sunday, December 2, 2012 8:35:08 AM UTC-5, Rkipper Kelley wrote:
Sounds good, noon EST. 

Rkipper

Jose Mª Martin

unread,
Dec 2, 2012, 11:03:22 AM12/2/12
to app-inventor-o...@googlegroups.com
I have to go now ... that nuisance, if I log in again to see if I have luck and have not started.

Jeffrey Schiller

unread,
Dec 3, 2012, 6:09:07 PM12/3/12
to app-inventor-o...@googlegroups.com
"git init" is used to create a new repository for a new project. What you want to do is "clone" your project on GitHub.

Delete C:\GitHub\appinventor-sources

Then cd to C:\GitHub (so it is your current directory) and then: "git clone g...@github.com:rkipper/AppInventor_rk.git appinventor-sources"

This instructs git to clone g...@github.com:rkipper/AppInventor_rk.git to a local repository/directory named appinventor-sources.

-Jeff



--
You received this message because you are subscribed to the Google Groups "App Inventor Open Source Development" group.
To post to this group, send email to app-inventor-o...@googlegroups.com.
To unsubscribe from this group, send email to app-inventor-open-so...@googlegroups.com.
Visit this group at http://groups.google.com/group/app-inventor-open-source-dev?hl=en.
 
 



--
_______________________________________________________________________
Jeffrey I. Schiller
Information Services and Technology
Massachusetts Institute of Technology
77 Massachusetts Avenue  Room E17-110A
Cambridge, MA 02139-4307
617.253.0161 - Voice
_______________________________________________________________________


Jeffrey Schiller

unread,
Dec 3, 2012, 6:10:04 PM12/3/12
to Jeffrey Schiller, app-inventor-o...@googlegroups.com
P.S. This will also automatically setup a remote named "origin" that will point back to your GitHub repository. So if you cd to:

C:\GitHub\appinventor-sources and do a "git remote -v" you should see the remote named origin point back to GitHub.

-Jeff

Rkipper Kelley

unread,
Dec 4, 2012, 6:25:23 AM12/4/12
to app-inventor-o...@googlegroups.com, Jeffrey Schiller
 
Thanks Jeff,  I believe I over thought it and in back tracking somehow accomplished it. I am going use git with a few other projects I have to become more familiar with it. I appreciate all your help.
 
Rkipper
To unsubscribe from this group, send email to app-inventor-open-source-dev+unsub...@googlegroups.com.
--
_______________________________________________________________________
Jeffrey I. Schiller
Information Services and Technology
Massachusetts Institute of Technology
77 Massachusetts Avenue  Room E17-110A
Cambridge, MA 02139-4307
617.253.0161 - Voice
_______________________________________________________________________


Gary Frederick

unread,
Dec 4, 2012, 7:50:36 AM12/4/12
to app-inventor-o...@googlegroups.com
Thanks Jeff.

I am still not sure what I should do with my source. I think... I want a repository forked from mit-cml to have something that has the MIT source and is close to the MIT public server. I also want a repository (or more) with the various things I am doing. I do not think most of what I will do will go into the MIT version. It's good stuff but not going down the path I (assume) MIT has laid out.

So do I have two or more remote repositories
or should I do something else?

Gary

David Ahern

unread,
Dec 4, 2012, 9:54:24 AM12/4/12
to app-inventor-o...@googlegroups.com, Gary Frederick
Clone the MIT source and create a branch within that repository for your
changes. You can switch back and forth between MIT code and your code,
merge newer MIT code into your branch, and more.

David

Gary Frederick

unread,
Dec 4, 2012, 1:24:05 PM12/4/12
to app-inventor-o...@googlegroups.com, Gary Frederick
Thanks David.

I did what you suggested
wrong :-)


Gary

Gary Frederick

unread,
Dec 4, 2012, 5:15:18 PM12/4/12
to app-inventor-o...@googlegroups.com, Gary Frederick
I think I am starting to get a handle on what I want.

I want to have a configuration that is built from the MIT source that folks can use as a personal server running locally or as a private server.

I have some customers that I build a version for. The version is based on the MIT source with whatever customization they want.

I have the ai4a configuration. It has the MIT changes and whatever we are doing for ai4a.

I have topic branches, where I am looking into some changes that may or may not go into ai4a.

The ai4a changes will probably not be submitted to MIT. If something is of interest to MIT, I can merge the part of interest and leave the rest alone.

I want to be able to merge the MIT update with the ai4a source.


or I am totally missing the point :-)

Gary ai4a

Jos Flores

unread,
Dec 4, 2012, 6:22:30 PM12/4/12
to app-inventor-o...@googlegroups.com
Gary,

your config seems to be a bit more complex than a 'normal' (whatever
normal is!) git repo.
You can definitely have different branches for each of your customers,
ai4a, your own development work, and all that, but it might get a bit
complex to have everything in sync.

Could you have two forks of MIT's code? one you use for your customers
(as far as I can read, they pretty much want what's on MIT's server,
but locally), and it will be easy to keep in sync with MIT's releases
(you can have different branches for each customer if you need to).
The other one you can use for ai4a and your own development, using
branches as needed.

When you start developing on feature branches, and start releasing
more versions of ai4a, you are going to see the number of branches
growing quite quickly, so it might be difficult to even find names for
branches... and there's nothing worse than naming something and a
couple of weeks later not being able to remember what it is supposed
to do! :)
Anyway, just a suggestion!

cheers,
José

David Ahern

unread,
Dec 4, 2012, 7:03:19 PM12/4/12
to app-inventor-o...@googlegroups.com, Jos Flores
I have 2 copies (clones) of the linux kernel repository and it causes
just as many problems as it solves. Inevitably, I end up with a branch
in one copy and wish I had it in the other. At this point I tend to do
all of my branches in a single repository and switch between the
branches as needed. The second clone tends to be just for source browsing.

Gary: I think you are making the problem more difficult than it needs to
be (thinking too hard). One repository will let you cherry pick patches
between customers, merge MIT source onto customer branches, merge local
dev branches onto multiple customer branches, etc. All the code is in a
single place with a single commit history.

David

On 12/4/12 4:22 PM, Jos Flores wrote:
> Gary,
>
> your config seems to be a bit more complex than a 'normal' (whatever
> normal is!) git repo.
> You can definitely have different branches for each of your customers,
> ai4a, your own development work, and all that, but it might get a bit
> complex to have everything in sync.
>
> Could you have two forks of MIT's code? one you use for your customers
> (as far as I can read, they pretty much want what's on MIT's server,
> but locally), and it will be easy to keep in sync with MIT's releases
> (you can have different branches for each customer if you need to).
> The other one you can use for ai4a and your own development, using
> branches as needed.
>
> When you start developing on feature branches, and start releasing
> more versions of ai4a, you are going to see the number of branches
> growing quite quickly, so it might be difficult to even find names for
> branches... and there's nothing worse than naming something and a
> couple of weeks later not being able to remember what it is supposed
> to do! :)
> Anyway, just a suggestion!
>
> cheers,
> Jos�

Gary Frederick

unread,
Dec 5, 2012, 6:56:02 AM12/5/12
to app-inventor-o...@googlegroups.com


On Tuesday, December 4, 2012 5:22:30 PM UTC-6, Jos wrote:
Gary,

your config seems to be a bit more complex than a 'normal' (whatever
normal is!) git repo.

:-)
 
You can definitely have different branches for each of your customers,
ai4a, your own development work, and all that, but it might get a bit
complex to have everything in sync.

The customers are not getting much more than the released MIT version with some 'personalization' Their school branding, a custom pointer to their own TinyWebDB and (eventually) another language.  I think that is 'easy' in git.
 

Could you have two forks of MIT's code? one you use for your customers
(as far as I can read, they pretty much want what's on MIT's server,
but locally), and it will be easy to keep in sync with MIT's releases
(you can have different branches for each customer if you need to).
The other one you can use for ai4a and your own development, using
branches as needed.

That is what I was thinking.
 

When you start developing on feature branches, and start releasing
more versions of ai4a, you are going to see the number of branches
growing quite quickly, so it might be difficult to even find names for
branches... and there's nothing worse than naming something and a
couple of weeks later not being able to remember what it is supposed
to do! :)

I am a naming guru. I use names like arf and aaa so they start meaningless and things descend into chaos quickly ;-)
very quickly...
 
Anyway, just a suggestion!

Good stuff. Thanks

Gary
 

cheers,
José



On 4 December 2012 22:15, Gary Frederick <g...@jsoft.com> wrote:
> I think I am starting to get a handle on what I want.
>
> I want to have a configuration that is built from the MIT source that folks
> can use as a personal server running locally or as a private server.
>
> I have some customers that I build a version for. The version is based on
> the MIT source with whatever customization they want.
>
> I have the ai4a configuration. It has the MIT changes and whatever we are
> doing for ai4a.
>
> I have topic branches, where I am looking into some changes that may or may
> not go into ai4a.
>
> The ai4a changes will probably not be submitted to MIT. If something is of
> interest to MIT, I can merge the part of interest and leave the rest alone.
>
> I want to be able to merge the MIT update with the ai4a source.
>
> https://docs.google.com/drawings/d/10zAQ-6qmuYOnBMWhfZq_FZPo9c6TGL0EPIgrSXv5PWI/edit
>
> or I am totally missing the point :-)
>
> Gary ai4a
>
> --
> You received this message because you are subscribed to the Google Groups
> "App Inventor Open Source Development" group.
> To post to this group, send email to
> app-inventor-o...@googlegroups.com.
> To unsubscribe from this group, send email to
> app-inventor-open-source-dev+unsub...@googlegroups.com.

Gary Frederick

unread,
Dec 5, 2012, 7:07:31 AM12/5/12
to app-inventor-o...@googlegroups.com, Jos Flores

On Tuesday, December 4, 2012 6:03:19 PM UTC-6, David A wrote:
I have 2 copies (clones) of the linux kernel repository and it causes
just as many problems as it solves. Inevitably, I end up with a branch
in one copy and wish I had it in the other. At this point I tend to do
all of my branches in a single repository and switch between the
branches as needed. The second clone tends to be just for source browsing.

How do folks with the various distros of linux handle it. A Linux repository and a (eg) Ubuntu repository?
 

Gary: I think you are making the problem more difficult than it needs to
be (thinking too hard). One repository will let you cherry pick patches

yep
my process: stumble around, get something that is probably overly complex but works, simplify.
I am still in the stumble around stage.
 

between customers, merge MIT source onto customer branches, merge local
dev branches onto multiple customer branches, etc. All the code is in a
single place with a single commit history.

The customer changes are not extensive. The ai4a changes are things I do not think will go back into MIT's version. I want to be able to merge new MIT changes into the ai4a repository.

If something from the ai4a repository is worth submitting to MIT, I should be able to get the diffs from just those changes in just that branch.

I am (probably) going to put the ai4a V1.2/V1.3 changes back. That included things like using a property file to get the location for the jarsigner, Android tools and more and saving the manifest so you can easily edit it and using the Android build process to build the App Inventor apk. Those are changes I do not see going into the MIT repository.
 
Thanks for the input. It helps.

Gary

David

On 12/4/12 4:22 PM, Jos Flores wrote:
> Gary,
>
> your config seems to be a bit more complex than a 'normal' (whatever
> normal is!) git repo.
> You can definitely have different branches for each of your customers,
> ai4a, your own development work, and all that, but it might get a bit
> complex to have everything in sync.
>
> Could you have two forks of MIT's code? one you use for your customers
> (as far as I can read, they pretty much want what's on MIT's server,
> but locally), and it will be easy to keep in sync with MIT's releases
> (you can have different branches for each customer if you need to).
> The other one you can use for ai4a and your own development, using
> branches as needed.
>
> When you start developing on feature branches, and start releasing
> more versions of ai4a, you are going to see the number of branches
> growing quite quickly, so it might be difficult to even find names for
> branches... and there's nothing worse than naming something and a
> couple of weeks later not being able to remember what it is supposed
> to do! :)
> Anyway, just a suggestion!
>
> cheers,
> Jos�
>
>
>
> On 4 December 2012 22:15, Gary Frederick <g...@jsoft.com> wrote:
>> I think I am starting to get a handle on what I want.
>>
>> I want to have a configuration that is built from the MIT source that folks
>> can use as a personal server running locally or as a private server.
>>
>> I have some customers that I build a version for. The version is based on
>> the MIT source with whatever customization they want.
>>
>> I have the ai4a configuration. It has the MIT changes and whatever we are
>> doing for ai4a.
>>
>> I have topic branches, where I am looking into some changes that may or may
>> not go into ai4a.
>>
>> The ai4a changes will probably not be submitted to MIT. If something is of
>> interest to MIT, I can merge the part of interest and leave the rest alone.
>>
>> I want to be able to merge the MIT update with the ai4a source.
>>
>> https://docs.google.com/drawings/d/10zAQ-6qmuYOnBMWhfZq_FZPo9c6TGL0EPIgrSXv5PWI/edit
>>
>> or I am totally missing the point :-)
>>
>> Gary ai4a
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "App Inventor Open Source Development" group.
>> To post to this group, send email to
>> app-inventor-o...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> app-inventor-open-source-dev+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages