Member-only story
How To SVN For Git Users
Yes someone is still using SVN in 2024, maybe it’s a big tech or a customer you are working for. Don’t panic, this is a basic guide on how to save your ass.
1. Cloning a Repository
In Git, you would clone a repository to create a local copy of a remote repository:
git clone <repository-url>
In SVN, the equivalent is checkout
, which also downloads a copy of the repository:
svn checkout <repository-url>
2. Committing Changes
In Git, you stage changes before committing them:
git add <file>
git commit -m "Commit message"
In SVN, committing is a bit different as it directly interacts with the central repository, and there is no staging area:
svn commit -m "Commit message" <file>
To commit all changes in the directory:
svn commit -m "Commit message"
3. Adding a New File
In Git, new files are added like this:
git add <new-file>
In SVN, you add new files before they can be committed:
svn add <new-file>
After adding, you would commit the change as shown earlier.