четверг, 11 апреля 2013 г.

SVN GIT MERCURIAL comparison cheatsheet



Git command
Hg command


git pull
hg fetch
hg pull -u


git fetch
hg pull


git push
hg push -r .


git checkout <commit>
hg update -c <cset>


git checkout [<rev>] -- <file(s)>
hg revert [-r <rev>] <file(s)>


git reset --hard
hg revert -a --no-backup


git revert <commit>
hg backout <cset>


git add <new_file>
hg add <new_file>


git add <file>
git reset HEAD <file>


git add -i
hg record


git commit --amend
hg commit --amend or
hg rollback ; hg commit or
hg qimport -r tip ; hg qrefresh -e ; hg qfinish tip 


git rebase --interactive
hg histedit <base cset>


git stash
hg shelve


git merge
hg merge


git cherry-pick <commit>
hg transplant <cset>
hg graft <csets>


git rebase <upstream>
hg rebase -d <cset>


git format-patch <commits> and git send-mail
hg email -r <csets>


git am <mbox>
hg mimport -m <mbox>


git describe
hg log -r . --template '{latesttag}-{latesttagdistance}-{node|short}\n'


git describe rev
hg log -r rev --template '{latesttag}-{latesttagdistance}-{node|short}\n'


git log origin..HEAD
git log origin/foobranch..HEAD
hg outgoing


git fetch && git log HEAD..origin
hg incoming


git show rev
hg export rev


git show hash:file
hg cat -r rev file


git ls-files
hg manifest


git log
hg log


git log -n
hg log --limit n


git ??
hg summary


git status
hg outgoing
hg status


git remote add -f remotename url


git remote update remotename
hg pull remotename


git branch -a
hg branches


git config --global user.(name|email) ...


git clean or
git status --porcelain|sed -r 's:\?\?\s(.*):\1:g'|xargs rm
hg purge or
hg status -un|xargs rm

Комментариев нет:

Отправить комментарий