Saturday, 18 January 2020

[git] changes

https://www.youtube.com/watch?v=_uWjGagIQcs

select branch

git checkout test
git branch

delete branch (locally)

git branch -d localBranchName

build

make M=drivers/staging/comedi/

auto-check

./scripts/checkpatch.pl --file --terse drivers/staging/comedi/drivers/ssv_dnp.c

verify

git status
git diff

revert changes (before patch)

git checkout test /xx/xx/xx

commit changes

add file to commit

git add <file>
git diff --cached

revert file from commit

git reset <file>

finally

#git commit -a
git commit -s -v

view the log

git log
git show
git show --pretty=full


who're the maintainers

perl scripts/get_maintainer.pl --separator , --nokeywords --nogit --nogit-fallback --norolestats -f drivers/staging/most/aim-sound/sound.c

format the changes (save to /tmp/)

git format-patch master..test
0001-XXX-XXX-XXX-XX.patch
./scripts/get_maintainer.pl 0001-XXX-XXX-XXX-XX.patch

git format-patch -o /tmp/ HEAD^

check the format of patch mail

./scripts/get_maintainer.pl 0001-XXX...patch

send mail

git send-email --to XX@XX.XX --cc XX@XX.XX -cc ... 0001-XXX...patch

git send-email --annotate HEAD^

revert changes (after patch)

git log --oneline
14u7289ykdja (HEAD -> test) Staging: XXX: XXX: XXXXX issue
git revert 14u7289ykdja


Who wrote that line?

git blame xxxx/xxxx.c



No comments:

Post a Comment

vm - Centos - Boot into latest Kernel

sudo grub2-set-default 0 sudo grub2-mkconfig -o /boot/grub2/grub.cfg sudo reboot