Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Git Essentials

You're reading from   Git Essentials Create, merge, and distribute code with Git, the most powerful and flexible versioning system available

Arrow left icon
Product type Paperback
Published in Apr 2015
Publisher
ISBN-13 9781785287909
Length 168 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Ferdinando Santacroce Ferdinando Santacroce
Author Profile Icon Ferdinando Santacroce
Ferdinando Santacroce
Arrow right icon
View More author details
Toc

Comparing Git and Subversion commands


Here you can find a short and partial recap table, where I try to pair the most common Subversion and Git commands to help Subversion users to quickly shift their minds from Subversion to Git.

Subversion

Git

Creating a repository

svnadmin create <repo-name>
svnadmin import <project-folder>

git init <repo-name>
git add .
git commit –m "Initial commit"

Getting the whole repository for the first time

svn checkout <url>

git clone <url>

Inspecting local changes

svn status
svn diff | less

git status
git diff

Dealing with files (adding, removing, moving)

svn add <file>
svn rm <file>
svn mv <file>

git add <file>
git rm <file>
git mv <file>

Committing local changes

svn commit –m "<message>"

git commit –a –m "<message>"

Reviewing history

svn log | less
svn blame <file>

git log
git blame <file>

...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime