Equivalent commands for GIT, SVN, and CVS

In our lab, we are maintaining software and documents in CVS, Subversion, and GIT repositories. Often, I find myself looking up commands online for tasks like looking up a particular version of a file or dealing with conflicting versions. To save myself (and hopefully others) some time, I started a small table with equivalent commands for the different repositories.

Show status of repository.git statussvn statuscvs status
Add new <files> to repository.git add <files>svn add <files>cvs add <files>
Commit changes in existing <files> to repository.git add -u <files> && git commit && git pushsvn commit cvs commit
Retrieve changes from repository.git pullsvn updatecvs update
Show log of changes to <file>.git log <file>svn log <file>cvs log <file>
Show changes in <commit> / <revision>.git show <commit>svn diff -c <revision>
Resolve conflicts in <files&gt;Fix conflicts in <files>. git add <files>Choose "postpone" when conflict is found by svn update. Fix conflicts in <files>. svn resolve --accept=working <files>

So far, I have only put a few commands that I remember from the top of my head. I haven’t double-checked them all, so using these commands is at your own risk. If you have any commands to add, feel free to leave a reply.

Applying to our group

If you are interested in a position in our group, please contact my advisor, prof. DeHon. Although I am flattered by applicants who address me as “Dr. Giesen”, I neither have a Ph.D. degree, nor am I involved in the admissions process other than that I forward e-mails to prof. DeHon. Furthermore, if you have a degree in pharmacology and are interested in clinical-based research (I did not make this up), save yourself the effort…