Subversion
From Shiftyjelly
Show the status of the repository.
svn status or svn st
Show the difference between the checked out file and the head of the repository.
svn diff config/environment.rb
Compare 2 revisions of a file
svn diff -rrev1:rev2 file
Show detailed history for a file
svn log -v file
Add a file to the repository.
svn add config/environment.rb
Commit a change to the repository.
svn commit -m "bug fix" config/environment.rb or ci
Revert an uncommitted change
svn revert file
Revert an already committed change
svn merge -r rev:rev-1 path
To ignore a file so that svn status doesnât display it. Run the command below, selecting the directory that contains the file e.g. log. Add the pattern of the filename you want to ignore for example development.log. Note: The file canât be in subversion so remove it first.
svn propedit svn:ignore log
Show the status of all files.
svn status --no-ignore
Show pending updates without applying them.
svn status --show-updates or -u
Update the working copy
svn update or up
Add your project into svn.
svn import -m "New import" Geekygecko svn://local/geekygecko/trunk/
Display the contents of the repository root.
svn list svn://led/
Checkout a project from svn into a directory called Geekygecko.
svn checkout svn://localhost/geekygecko/trunk Geekygecko or co
Find out where a working copy came from
svn info path svn info
Create a release, branch or tag using a copy
svn copy -m "tag message" svn+ssh://username@www.webserver.com/home/username/svn/project/trunk
svn+ssh://username@www.webserver.com/home/username/svn/project/releases/project_20081029_added_gui/
Create a patch file
svn diff > patchfile
Apply a patch file
path -p0 -i patchfile
Create a full repository backup
svnadmin dump repos > dumpfile
Create an incremental repository backup
svnadmin dump --incremental --revision rev1:rev2 repos
Create a hotcopy backup of the repository
svnadmin hotcopy repos backup-repos
Checkout a version based on a particular date (Note: If you do not specify time it will be 00:00)
svn checkout -r {"2008-06-13 23:59"} svnrep/projectname/trunk my_checked_out_project
Git
How to create your own fork
Go to github and click the “fork” button. git clone git://github.com/stevenbristol/lovd-by-less.git cd lovd-by-less Make your changes git status git commit -a git push go back to git hub and click the “pull request” button.