Wiki - README‎ > ‎Programming‎ > ‎

Version Control

below are several ver control systems

git

mindmap of git commands [link] [link]
git cheat sheet [link]
19 tips for everyday  git use [link]
most common git screwups/questions and solutions [link]
patch workflow [link]
every line of code is documented: hidden documentation [link]
git commands - quick and dirty [link]
git flow chart [link]
image diff [link]
remove file permanently [link]
remove sensitive files [link]
tips from trenches [link]
cheat sheet [link]
linux gui [link]
ry's git tutorial [link]
handy git tips [link]

great, simple tut [link]
#On local machine
cd foo_project
git init
git add *
git commit -m "My initial commit message"

#On remote machine (Git remote repository)
sudo su - git
cd /usr/local/git_root/

mkdir foo-project.git
cd foo-project.git/
git --bare init

git config core.sharedrepository 1
git config receive.denyNonFastforwards true
find objects -type d -exec chmod 02770 {} \;
#The core.sharedrepository flag tells git to keep everything group readable and writable.
#The receive.denyNonFastforwards flag makes sure that merges can't happen when you push to the repo. You have to do the merges on your local machine, and then push the result.

#On local machine, in your git project
git remote add origin ssh://git@example.com:2227/usr/local/git_root/foo_project.git
# or, git remote add origin ssh://git@example.com/usr/local/git_root/foo_project.git
git push origin master

#Switch to origin/master so you don't get any error about "fatal: Cannot force update the current branch."
git checkout origin/master
#Create the local "master" branch that is tracking the "origin/master" branch
git branch -f master origin/master
#Switch back to your "master" branch
git checkout master

tut [link]

ref [link]

git basics [link]

svn
revert all changes (careful!)
$ svn revert -R .

save diff as patch
$ svn diff > diff.patch

patch
$ patch -p0 < diff.patch


Comments