git svn clone https://subversion.my.com/svn/mysvnproj mygitproj
然後以後要從 svn update,對應的是:
git svn fetch
fetch 完,自己工作的 branch 要 update,還要下一次:
git svn rebase
git svn clone https://subversion.my.com/svn/mysvnproj mygitproj
git svn fetch
git svn rebase
git tag -d 12345delete remote:
git push origin :refs/tags/12345
git reset --hard ed2b7f3501f6這樣,用 git log 看,最後會在 commit ed2b7f3501f6 的地方。
.git/hooks/prepare-commit-msg
#!/bin/sh if test -r "checkpatch.pl"; then git diff --cached | ./checkpatch.pl --no-signoff --no-tree - fi檢查project 目錄是不是有 checkpatch.pl 好決定是不是要 執行
! grep -qs "\[NO_STYLE_CHECK\]" "$1" || exit 0就可以在 commit 時,加入 "[NO_STYLE_CHECK]" bypass 掉 checkpatch:
$ git commit -am "[NO_STYLE_CHECK] try commit dirty codes"
#!/bin/sh # # pre-commit hook to run check-patch on the output and stop any commits # that do not pass. Note, only for git-commit, and not for any of the # other scenarios # # Copyright 2010 Ben Dooks,if git rev-parse --verify HEAD 2>/dev/null >/dev/null then against=HEAD else # Initial commit: diff against an empty tree object against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 fi git diff --cached $against -- | ./scripts/checkpatch.pl --no-signoff -
$ git revert COMMIT-SHA
git log commit A ... commit B ... commit C ..就要反過來:
git revert A git revert B git revert C
machine my.git.com login checko password mygitpassword.. 對,是明文 ..
Initialized empty Git repository in /xxxx/xxxx/.git/ Password: error: server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none while accessing https://xxxx@xxxx.xxxx/xxxx/xxxx.git/info/refs fatal: HTTP request failed這時候就加上這個還就可以:
export GIT_SSL_NO_VERIFY=1