GitHub Question

Discussion in 'iOS Programming' started by loon3y, Sep 3, 2014.

  1. loon3y, Sep 3, 2014
    Last edited: Sep 3, 2014

    loon3y macrumors 65816

    loon3y

    Joined:
    Oct 21, 2011
    #1
    Multiple people work on the same project and we have a problem managing. (in terms of having multiple source codes, sometimes a co-worker grabs an older source code rather than the most recent one, one person forgot to rename to a higher version number after working on it, etc etc)


    I was reading about it, and if two people work on it at the same time it saves two copies which can be merged together later? how efficient is this? How was your experience with GitHub?



    Also we have an ERP system that was built using powerbuilder, is there anything i can use to help with version control?


    Edit: Does it also snap changes in the storyboard?
     
  2. ArtOfWarfare macrumors G3

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #2
    Here's the commands we always go through:

    Code:
    git status
    (sometimes git diff)
    git add
    ... repeat as necessary...
    git commit -m "message here"
    git pull --rebase
    git push
    Any conflicting changes occur on the machine of the developer who attempts to push second. Thus they're forced to resolve the issue then and there when they try to sync. There's never any issues on the server.

    But conflicting changes are rare - the code/tasks should be divided up such that no two people are making changes to the same file.
     
  3. PhoneyDeveloper macrumors 68040

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #3
    git and GitHub are two different things. git is a distributed source code control system. GitHub is a commercial web site that offers hosting of git repositories and its own web UI for managing those repos. There are other web sites that also offer hosting for git and other source code control systems. I've used GitHub and also BitBucket. They both work fine. I think there are dozens of similar web hosts.

    Any non-trivial source code project should use source code control. It offers many features that are important for managing source code projects. I wouldn't worry about merges. git manages merges relatively well. There is a little bit of control over the automated merging strategy used that can be configured. However, conflicts need to be resolved by a human. Binary files, like jpegs, cannot be merged. Xcode has git support built in, although you may need or want to use the command line for some actions. I'm not sure about storyboards. Xcode has some smarts when merging project files and maybe other kinds of xml files. It may be able to merge storyboards in a smart way. I haven't worked on a project where multiple developers modified a storyboard at the same time.

    Xcode also provides a GUI side-by-side diff view that lets you compare differences between your local file and a previous revision in the repo. This is about a million times better than git diff (at least to me).

    Almost everyone is using git these days. In the rearview are subversion and cvs. There are some other distributed system like mercurial that are also in use, but I've never used them.
     

Share This Page