If it is not explicitly told in following recipe, setting up services are described for Ubuntu 20.04 server, but applications are described for Xubuntu 20.04 workstation. If you use different Ubuntu version or Linux distribution, settings as well as content, names and places of configuration files may be different!
Got it.

18. Git branches and merge

  1. Review presentation

    Practical exercise

  2. If necessary, install meld and diffuse tools:

    sudo apt install meld
  3. Open your project:

    cd ~/workspace/uXX

    where uXX is code of your project.

  4. Add, commit and push changes of your project to the tools.odo.lv (to be sure you have all your previous work on tools.odo.lv).
  5. Add new remote repository https://odo.lv/git/JTM/ to your project:

    git remote add upstream https://odo.lv/git/JTM/
  1. Pull branches branch1 and branch2 from upstream repository to branches into your repository:

    git fetch upstream branch1:branch1
    git fetch upstream branch2:branch2
  2. Check that your repository has three branches:

    git branch


    * master
  3. Make two copies of your project, for example uXX-1 and uXX-2 as sibling projects in your workspace.
  4. Check out branches in copies of the project:

    cd ~/workspace/uXX-1
    git checkout branch1
    cd ~/workspace/uXX-2
    git checkout branch2
  5. Open meld, and compare content of your original project, e.g. uXX and uXX-1, copy and save missing parts of content into uXX project.
  6. Compare content of catbN.txt files in jtm.activity18 package between projects with master and/or branch1/branch2 branches.
  7. Merge content of all numbered filees catbN.txt into single catb.txt file
  8. Check that catb.txt file has proper content by running GitMergeTest1.java unit test.
  9. Before you add, commit and push changes to tools.odo.lv, ensure you are working on master branch, e.g. command:

    git branch


    * master

Additional info


Created by Valdis Vītoliņš on 2018-03-26 07:55
Last modified by Valdis Vītoliņš on 2021-08-12 14:42
Xwiki Powered
Creative Commons Attribution 3.0 Unported License