Zum Hauptinhalt springen

Schlagwort: Tools

Manually merging git commits

Today I learned how to manually merge a git branch, when you want to be sure to compare each difference after a merge.

  1. Don’t fast-forward and commit when merging:

    git merge --no-ff --no-commit feature-branch
    
  2. Now changes are applied and staged. Because we want to inspect each difference, we remove all changes from the staging area:

    git restore --staged .
    
  3. Changes are now only applied, but not staged. So we can now easily inspect each change (via cli or IDE) and remove all changes we don’t want to keep.

Querying browser history in 16th century

As of this answert to the popular question, the data model of the Chrome or Chromium Browser stores timestamp as the number of microseconds since first of January, 1601.

Therefore an valid SQL query to search for visits betwen two dates looks like this:

SELECT v_time, urls.url, urls.title FROM 
  (SELECT
    url,
    datetime(visit_time / 1000000 + (strftime('%s', '1601-01-01')), 'unixepoch', 'localtime') as v_time
  FROM visits
  ORDER BY visit_time DESC) as X
    LEFT JOIN urls ON X.url = urls.id
    WHERE X.v_time > '2023-09-27' 
      AND X.v_time < '2023-09-30';