Skip to content

Latest commit

 

History

History
83 lines (71 loc) · 2.55 KB

File metadata and controls

83 lines (71 loc) · 2.55 KB

Miscellaneous


Table of Contents


Git Reduce Threads Used

  • Reducing the threads, which are used by git client (here: only for the current push)
git -c pack.threads=1 push

Git Adjust HTTP Post Buffer

  • Sometimes a good idea when not working with ssh but https instead
git config --global http.postBuffer 157286400

Git Change HTTP Version

  • Mght be useful in case of errors like error: RPC failed; curl 92 HTTP/2 stream 5 was not closed cleanly: CANCEL (err 8)
git config --global http.version HTTP/1.1
# do stuff
git config --global http.version HTTP/2

Remove file from git history

  • Sometimes a file gets committed accidentally, removing it from git history is challenging
  • With git-filter-branch you can filter and remove parts of commits
git filter-branch --force --index-filter \
  'git rm --cached --ignore-unmatch directory/and/filename.extension' \
  --prune-empty --tag-name-filter cat -- --all
  • Remove the remaining references to the old history in the local repository
git for-each-ref --format='delete %(refname)' refs/original | git update-ref --stdin
  • Now expire the reflog
git reflog expire --expire=now --all
  • Local repo still contains objects for olf commits, but without refs - objects itself need to be removed
git gc --prune=now
  • Push rewritten history
git push origin --force --all
git push origin --force --tags
  • If necessary, update other clones
git fetch origin 
git reset --hard origin/master
  • Old commits need to be removed in order to cleanup the local clone
git for-each-ref --format='delete %(refname)' refs/original | git update-ref --stdin
git reflog expire --expire=now --all
git gc --prune=now

Tmux on Synology NAS

  • Synology NAS systems usually do not have a fully blown set of tools installed ... what for
  • If needed it is still possible to get typical tools like tmux installed
    • Check your version/codename
    • Search for it here: https://archive.synology.com/download/Package/DiagnosisTool
    • After download, install via packet manager
    • Do not forget to update from time to time ;)
  • If your NAS has internet connection, synogear install might be used
  • Tools can be found in /var/packages/DiagnosisTool/target/tool/