Skip to content

Quick start

Repo

First clone the repo

git clone https://github.com/UiASub/Topside

then install dependencies

pip install -r requirements.txt

How to use git

To create a new branch

git checkout -b <branch_name>

Work on the Branch

  • Make changes to the code as needed.
  • Stage the changes you want to commit
git add <file_name>
  • Alternatively, stage all changes:
git add .

Commit Your Changes

  • To commit the staged changes
git commit -m "Your descriptive commit message"
  • Make sure the commit message is clear and explains what the changes do.

Push the Branch to the Remote Repository

git push

Sync Your Branch with the Main Branch (Rebase)

  • Before merging your branch, make sure to update your branch with the latest changes from the main branch:

  • Switch to the main branch:

  • Pull the latest changes:
  • Switch back to your branch:
  • Rebase your branch onto the latest main branch:
git rebase main
  • Resolve any merge conflicts that arise during the rebase

Merge Your Branch to the Main Branch

  1. After a successful rebase, switch to the main branch:
  2. Merge your branch into the main branch:
git merge <branch_name>

After a succsefull merge push the changes

git push

If you want to checkout another branch whith uncommited changes

git stash

NB: This will discard your local changes