Mastodon

The version control system. https://git-scm.com/

Snippets

  • git add -N <path> - start tracking a file, without adding its content to index. Useful to make the file visible in git add -p or git diff.
  • git subtree pull --prefix <localdir> --squash <remote> <remote-branch> - updating contents of a subtree
  • git tag --sort v:refname - list tags, sorting like version names (so 1.11 > 1.2)

Update branch in a bare repo

$ git remote -v
origin  /etc/ (fetch)
origin  /etc/ (push)
$ git fetch origin master:master

See also