Android Question Having trouble using Github syncing across computers

Discussion in 'Android Questions' started by netchicken, May 28, 2015.

  1. netchicken

    netchicken Active Member Licensed User

    We are using Github to work on a shared project. Its our first time working with GitHub. We have about 7 machines and the students are all building a single project.

    We seem to be having numerous issues with Github and B4A.

    eg: A new class was uploaded by a student and was synced to my local repository DataManager.bas yet that class doesn't show up when I run the program by reloading the program.

    Another problem is that the files seem to be replacing, and not merging with each other. So the last person to upload overwrites the earlier work that has been uploaded.

    Has anyone else had issues like this. Its stalled our work :)
    Last edited: May 30, 2015
  2. netchicken

    netchicken Active Member Licensed User

    In the .meta file there is a list of visible modules

    How can we modify this for Github?

    **Solved this issue here** just use Project/Add Existing Modules to add in the new modules

    We still can't get the files to merge and not overwrite each other however
    Last edited: May 28, 2015
  3. Peter Simpson

    Peter Simpson Expert Licensed User

    You should write one line at a time to the file, well that's what I would do anyway. Well I think that is what you're trying to do.
    Sub Activity_Create(FirstTime As Boolean)
    "Add this line to the file")
    End Sub

    Sub AddText(Line As String)
    Dim TxtWriter As TextWriter
    File.OpenOutput(File.DirRootExternal, "TextFile.txt"True))
    End Sub
  4. netchicken

    netchicken Active Member Licensed User

    Just an update, I found we are doing it wrong :) We should be creating branches of each feature we need and then merge those branches with the master file after its been passed by the other members in a Pull request. We are just all working on the master file. I hope this helps others.
  5. sorex

    sorex Expert Licensed User

    when there are conflicts it should give you the option to compare the conflicting files and select which lines your want to keep.

    while this system can be a good thing it can be annoying aswell when several people work in the same file(s).
    the best way seems to be creating a copy of your latest work, pull, apply changes and push it again (and hope noone else pushed aswell during that time)
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice