Tuesday, 28 July 2020

[modelio] corrupted diagrammes

Sympom

I experienced several times now that diagrammes got currupted. Some components missing others renamed. Very annoying and tedious to fix.

Cause

I did not actually test this, but I suspect that the cause is copying a diagramme to take advantage of already defined objects. But then
  • one renames some objects
  • one deletes some objects
  • one adds objects
Latter is no problem at all but as the objects of the copy diagramme are not copies but sort of links to the original
  • renaming will rename the orignal
  • deleting will delete the original
thus rendering the original diagramme in a dire state. I have not found means neither to just remove objects from a Diagramme instead of deleting them nor to cut the link to the original.

Solution

Create an all new Diagramme.

Wednesday, 1 July 2020

[git] rename a remote branch

Apparently, it is not possible to rename a remote branch directly. You need to rename the local branch push it to a new remote branch and delete the remote branch then:
#bash
# If you are not on the branch to rename, do
git branch -m <old_name> <new_name>
# or check it out
git checkout <old_name>
git branch -m <new_name>

# Push it to the remote repo and make it track at the same time
git push origin -u <new_name>

# Delete the old branch in the remote repo
git push origin --delete <old_name>
You  might run into problems, e.g. when you already created the new remote branch, maybe using the branch functionality in JIRA to have a link between branch and issue. The symptom is when running the push to the new remote:
#bash
To ssh://git@stash-prod.pnet.ch/adw/adw1.git
 ! [rejected]        bugfix/kellnerth/SGA-1872-abhangigkeiten-in-arbitrary--monthly--outbound -> bugfix/kellnerth/SGA-1872-abhangigkeiten-in-arbitrary--monthly--outbound (non-fast-forward)
error: failed to push some refs to 'ssh://git@stash-prod.pnet.ch/adw/adw1.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')
hint: before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
This behaviour is independent of pulling from the repository. You can push the new branch to remote by forcing it, e.g.
#bash
git push -f origin <new_name>
Apparently it is not a good solution. I ended up with two local branches apart from the "prefix" origin/ identically named. The local "origin" branch was not tracking any

[Logitech MX Vertical] starts to creep its cursor

Symptom

Even if you do not touch the mouse, its cursor creeps over the screen.

Solution

Switch it off and on again possibly waiting a couple of seconds inbetween.

[git] Create a local branch from another branch

From the active branch git checkout -b <LOCAL_BRANCH> From a donator branch git checkout -b <LOCAL_BRANCH> <DONATING_BRANCH...