Giter Site home page Giter Site logo

hwr-oop-lecture-shared's Introduction

HWR OOP Lecture Shared Code

This repository is used to share source code material for an ongoing lecture on object-oriented programming with Java at HWR Berlin (summer term 2022).

⚠️ This code is for educational purpose only. Do not rely on it!

Students That Are New To Git

It is best to have a local repository of this at hand. To avoid Git additional git confusion, follow the following steps:

  1. Make sure you have the required software available (IntelliJ IDEA, JDK, Maven, Git).
  2. Clone this repository into a directory of your choice.
git clone <repository-url>
  1. Copy the repository's content into another folder next to the repository. Then, in the other folder, remove the .git-folder. The following commands should do it. If you are using Windows without WSL, do it all by hand in the explorer (just as you are used to).
cp -r <repository-name>/ <other-folder-name>/
cd <other-folder-name>/
rm -rf .git/
  1. Open both the repository and the other folder in IntelliJ IDEA.

⚠️ Only code in the other folder, not the cloned repository. You should only use the cloned repository to copy code into your local environment.

  1. Once you are required to refresh the code during the lecture: Go into your local repository (the original, not the copy) and pull.
cd <repository-name>
git pull
  1. If the pull fails (again make sure that your code is in the other folder, the copy created earlier), do a "force pull".
git reset --hard origin/master

Git-aware Students

Feel free to fork this repository and do your coding there. Remember to add this repository as a second remote repository (upstream) and pull from the correct remotes. The following section describes how to do this.

Multiple remote repositories

Your local repository should have a reference to both the fork (your own remote repository) and the original remote repository. To configure your git remote repositories, use the git remote command set.

  1. Clone your fork and go enter the repository.
git clone <fork-url>
cd <created-folder>
  1. Now your fork is configured as primary remote repository (origin). Next to origin, you should add the original repository as a second remote repository (upstream).
git remote add upstream <repository-url>
  1. Verify that both remotes are configured correctly. The following command should list both remotes: origin and upstream.
git remote -v
  1. To fetch changes from all remote repositories, use:
git fetch --all
  1. If there are interesting changes (in e.g. the main branch) to merge into your branch, use:
git pull upstream main

hwr-oop-lecture-shared's People

Contributors

stefreschke avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.