Роман Теличко

Заметки веб-разработчика/админа

Соответствия команд SVN и Git

// | 335 просмотров | комментариев (0)

Я создал небольшую шпаргалку соответствий команд систем управления версиями SVN/Subversion и Git. Пользуйтесь! 😉

svnadmin create repo
 
git init
git add .

svn import file://repo
git commit

svn diff | less
git diff

svn diff -rrev path
git diff rev path

patch -p0
git apply

svn status
git status

svn revert path
git checkout path

svn add file
git add file

svn rm file
git rm file

svn mv file
git mv file

svn commit
 
git commit -a
git push remote

svn log | less
git log

svn blame file
git blame file

svn cat url
git show rev:path/to/file

svn list url
git show rev:path/to/directory

svn log -rrev url
svn diff -crev url
git show rev

svn copy https://example.com/svn/trunk
https://example.com/svn/tags/name
git tag -a name

svn list https://example.com/svn/tags/
git tag -l

svn log —limit 1 https://example.com/svn/tags/tag
git show tag

svn copy https://example.com/svn/trunk https://example.com/svn/branches/branch
git branch branch

svn switch https://example.com/svn/branches/branch
git checkout branch

svn list https://example.com/svn/branches/
git branch

svn update -r rev
git checkout rev

svn update
git checkout prevbranch

svn merge -r rev:HEAD https://example.com/svn/branches/branch
git merge branch

svn merge -c rev url
git cherry-pick rev

svn checkout url
git clone url

svn switch url
 
git checkout —track
 -b branch origin/branch

svn update
git pull