Skip to content

Instantly share code, notes, and snippets.

View dverunka's full-sized avatar
🐹

Veronika Dzurikova dverunka

🐹
View GitHub Profile
@dverunka
dverunka / samsung-adb-users
Last active April 11, 2025 07:16
Add guest user on Samsung phone using adb
// list of existing users
adb shell pm list users
>> Users:
UserInfo{0:Owner:4c13} running
// current user id
adb shell am get-current-user
>> 0
// create guest user (must be guest, phone does not allow additional full-fledged user)
@dverunka
dverunka / git-patches
Created December 21, 2022 16:15
Generate patch file from commits
// generate patch file from the topmost <n> commits from a specific SHA-1 commit hash
git format-patch -<n> <SHA-1> --stdout > <name_of_patch_file>.patch
// example
git format-patch -10 HEAD --stdout > patch-of-last-10-commits.patch
@dverunka
dverunka / git-rebase-history
Created May 11, 2022 11:36
How to rebase git history
git reset --hard origin/master
git rm -r --cached .
git add .
git commit -m "commit message"
git rebase -i <commit-id>
prepísať "pick" na "f" od druhého riadku dole, uložiť a zavrieť vim
git rebase -i --root
zase prepísať "pick" na "f" od druhého riadku dole, uložiť a zavrieť vim
git push -f
@dverunka
dverunka / git-reset-commits-author
Last active November 22, 2022 16:15
Reset author for all commits in current repository
git config user.name "Veronika Dzurikova"
git config user.email "xvera6@gmail.com"
// aktualizuje dátum a čas commitov na aktuálny
git rebase --root --exec "git commit --amend --no-edit --reset-author"
// uchová dátum a čas commitov autora
git rebase --root --exec "git commit --amend --author='Veronika Dzurikova <xvera6@gmail.com>' --no-edit"