Automatically sync with the origin - micropython/micropython

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
lnsri22
Posts: 75
Joined: Fri Aug 17, 2018 12:16 pm
Location: India

Automatically sync with the origin - micropython/micropython

Post by lnsri22 » Mon Dec 24, 2018 12:50 pm

Hi Everyone!!

I have been developing my own hardware with upython as the operating system with the STM32F4XX series controller. It's been a while since I checked out the remote repository 'micropython' . Now I have made some decent changes to the files as per my need, I just thought of having a look at the repo today so that I could know on the updates and the changes made. One interesting thing was this commit
https://github.com/micropython/micropyt ... 255b8686a1

This is what I have implemented today , but for a different purpose (to mount the sd card , but to boot from the internal flash). I have followed what Dave has suggested here.

https://github.com/micropython/micropyt ... -199666920

My question now is how should I maintain the architecture of the repo (or any specific configuration to be maintained) in order to always be in sync with the remote repository.

My question might be a bit weird. But the above is my goal.


Thanks in advance!!
lnsri22 :)

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Automatically sync with the origin - micropython/micropython

Post by dhylands » Wed Dec 26, 2018 7:41 pm

Normally you would create a branch (in your own repository which is a fork of the micropython repository). This branch would have your changes which are not included in the master branch, and you would rebase it with master periodically to keep your branch up to date.

lnsri22
Posts: 75
Joined: Fri Aug 17, 2018 12:16 pm
Location: India

Re: Automatically sync with the origin - micropython/micropython

Post by lnsri22 » Mon Dec 31, 2018 11:02 am

Hi Dave,

Thanks Again!!

Sorry to put this question here. I have been using micropython to develop my own hardware. I'm a bit new to these concepts(forking, syncing ).

Would the changes I do or a new library I develop be synced automatically to origin (micropython/micropython) (this couldn't be done, since I'm bound to an organisation) or only the changes that are made in remote will be impacted in the forked copy?

Thanks in advance!!
lnsri22 :)

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Automatically sync with the origin - micropython/micropython

Post by dhylands » Mon Dec 31, 2018 6:34 pm

When you create a fork, you can chose which github account it goes to. So it could either go to your organizational repository on github or your own personal account.

Nothing is "automatically" synced between the fork and the official repository. It's up to you to issue the appropriate commands to do the syncing.

If I create a library for micropython, I normally do it in a separate repository. I also normally create my BOARD files for new/custom hardware in separate repositories as well.
See: https://github.com/dhylands/wiki/wiki/M ... oard-files

and then I just put the board repository in the correct place in the micropython tree (see the README.md for the 1BITSY for example)
https://github.com/dhylands/1BITSY

And this is an example of an external library (written entirely in python): https://github.com/dhylands/upy-rtttl/

In your own repository, you can create your own branches and rebase them to the micropython offical repository by using the concept of remotes. https://stackoverflow.com/questions/561 ... 50#5617350

https://git-scm.com/book/en/v2/Git-Basi ... th-Remotes

lnsri22
Posts: 75
Joined: Fri Aug 17, 2018 12:16 pm
Location: India

Re: Automatically sync with the origin - micropython/micropython

Post by lnsri22 » Wed Jan 02, 2019 4:10 pm

:D

Thank you so much for the clarification!!
lnsri22 :)

Post Reply