git

This document is not for everyone. This is prepared for those who are not familiar with git, but need to use git to work with Dr. Kwon. Of course there will be some learning curve, but you will like it.

STOM Group uses GitHub for writing research papers together and developing software. Visit the STOM-Group account page.

What is Git?

Git is a version control system. Watch these videos.

Instructions to STOM Group members

  1. Create an account using your .edu email address and request an education pack at GitHub Education.
  2. Install GitHub Desktop.
  3. Email Dr. Kwon your GitHub account name. He’ll add you to the GitHub group.

You’re now ready. Learn how to do the following tasks.

  1. Clone this SandBox repository to your local desktop.
  2. Create a new branch.
  3. Make some changes in your local desktop.
  4. Commit the changes and sync
  5. Create a pull request to merge.

Some Rules

  • For LaTeX documents, try to use a single line for each sentence.

DO:

Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Vivamus placerat molestie urna vel egestas.
Vivamus eget sagittis lacus.
In hac habitasse platea dictumst.
Donec dictum augue elit, eget porttitor mi facilisis non.
Nullam id dolor porttitor, pellentesque nulla eget, tristique erat.
Ut vel semper tortor, nec ultricies dolor.
Vestibulum mattis ipsum et nibh commodo, vitae varius mauris egestas.
Integer sed ante non enim bibendum vehicula.
Sed gravida felis sed suscipit imperdiet.
Vestibulum et tristique felis, eu blandit ex.
Curabitur eu pretium nunc.
Mauris mattis nec dui vitae gravida.
Aenean sed fringilla turpis.
Aenean vel nunc iaculis, porttitor odio vitae, mollis metus.

DO NOT:

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus placerat molestie urna vel egestas. Vivamus eget sagittis lacus. In hac habitasse platea dictumst. Donec dictum augue elit, eget porttitor mi facilisis non. Nullam id dolor porttitor, pellentesque nulla eget, tristique erat. Ut vel semper tortor, nec ultricies dolor. Vestibulum mattis ipsum et nibh commodo, vitae varius mauris egestas. Integer sed ante non enim bibendum vehicula. Sed gravida felis sed suscipit imperdiet. Vestibulum et tristique felis, eu blandit ex. Curabitur eu pretium nunc. Mauris mattis nec dui vitae gravida. Aenean sed fringilla turpis. Aenean vel nunc iaculis, porttitor odio vitae, mollis metus.
  • When you are making a very minor changes, commit and sync with the master branch. If you are making some middle to big changes or new additions, always create a new branch and work there, without touching the master branch.

  • More information on git + LaTeX workflow.

Readings and Tutorials

Resolving Conflicts (for GitHub)

When you sync your changes to the main repository on the web, it may create conflicts. Saying, Dr. Kwon has made some changes, while you are making changes, and there are conflicts. In such cases, do the following:

  1. In GitHub Desktop, select your working branch and press the button for Update from master.
  2. In your local folder, open the file with conflicts with a text editor.
  3. here will be something like <<<<<<< HEAD. Edit those parts as you like to be.
  4. Return to GitHub Desktop, and commit the changes again, and sync and/or create a pull request.

Resolving Conflicts (for Bitbucket)

  1. Commit your changes. Push will be rejected if your commit has some conflicts with the remote files.
  2. Pull the remote to your local. It will identify conflicts.
  3. Resolve the conflicts manually. Open the conflicting file from your local folder. There will be something like <<<<<<< HEAD. Edit those parts as you like. (Do NOT use automatic merge tools such as ‘Resolve using Mine’ and Resolve using Theirs’. I think it is too dangerous. Do it manually.)
  4. Commit your resolved clean changes.
  5. Push them.
  6. Check if everything is okay and delete .orig files, if any, in your local folder. (Don’t commit/push .orig files.)