Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You will need two git accounts. A root account and then all others get invited into to the repo. In one location on my machine I created the project and linked it to the root git repo. I then git cloned from the invited team member’s git repo the project into another location on my machine. So the same project in two locations on my machine, each location tied to a different git accounts, the git accounts have a shared repo. Follow steps below to repeat the simulation:

  1. One team member (root user) creates a remote git repo (the root account)

  2. Invite the other team member into this root account. Once they accept, the root repo will appear in their account

  3. Someone in the team must set the project up, they push this to the root repo

  4. Other team members clone the project. Once cloned they can begin to work on their part of the project

  5. Root user creates assets and pushes them to master

  6. Team member 2 creates some assets and attempts to push them to master

  7. A git conflict occurs

  8. User git pull --rebase origin master

    1. git pull is like using svn update

    2. --rebase option tells Git to move all of Mary’s commits to the tip of the master branch after synchronising it with the changes from the central repository. The pull would still work if you forgot this option, but you would wind up with a superfluous “merge commit” every time someone needed to synchronize with the central repository. For this workflow, it’s always better to rebase instead of generating a merge commit.

  9. Team 2 member begins to resolve conflicts if their any, git will indicate there conflicts using the following message

  10. Team 2 member can resolve their conflicts using git status, it will show something like

    1. Code Block
      # Unmerged paths:
      # (use "git reset HEAD <some-file>..." to unstage)
      # (use "git add/rm <some-file>..." as appropriate to mark resolution)
      #
      # both modified: <some-file>

  11. Resolve the conflicts if there are any, then use the following commands

    1. Code Block
      git add <some-file>
      git rebase --continue

  12. Git will move onto the next conflict

  13. Once completed, execute git push origin master

  14. If things get confused and messed up on the merge execute a git rebase --abort, this will revert everything back to the start

...