Thursday, September 29, 2011

Using Git with Subversion

Using Git with Subversion

  • Install Git
  • sudo apt-get install git-core
  • Tips
  1. svn:mime-type property
If you're adding new files through git svn, you should set the svn:mime-type property on those files. You can have SVN do this automatically and git will respect those settings. Put the following in your~/.subversion/config file:
[miscellany]
enable-auto-props = yes

# Add an additional line for each type of binary file you wish to commit.
# You can add as much as you like.
[auto-props]
INSTALL = svn:eol-style=native
KEYS = svn:eol-style=native
Makefile = svn:eol-style=native
README = svn:eol-style=native
*.aart = svn:eol-style=native
*.ac = svn:eol-style=native
*.am = svn:eol-style=native
*.bat = svn:mime-type=text/plain;svn:eol-style=native
*.bit = svn:mime-type=application/octet-stream
*.c = svn:mime-type=text/plain;svn:eol-style=native
*.cat = svn:eol-style=native
*.cgi = svn:eol-style=native
*.cgp = svn:mime-type=text/plain;svn:eol-style=native
*.classpath = svn:eol-style=native
*.cmd = svn:eol-style=native
*.coe = svn:mime-type=text/plain;svn:eol-style=native
*.cpp = svn:mime-type=text/plain;svn:eol-style=native
*.css = svn:mime-type=text/plain;svn:eol-style=native
*.cwiki = svn:eol-style=native
*.data = svn:eol-style=native
*.dcl = svn:eol-style=native
*.do = svn:mime-type=text/plain;svn:eol-style=native
*.doc = svn:mime-type=application/msword
*.dsp = svn:eol-style=CRLF
*.dsw = svn:eol-style=CRLF
*.dtd = svn:eol-style=native
*.egrm = svn:eol-style=native
*.ent = svn:eol-style=native
*.grm = svn:eol-style=native
*.g = svn:eol-style=native
*.h = svn:mime-type=text/plain;svn:eol-style=native
.htaccess = svn:mime-type=text/plain;svn:eol-style=native
*.html = svn:mime-type=text/plain;svn:eol-style=native
*.ihtml = svn:mime-type=text/plain;svn:eol-style=native
*.in = svn:eol-style=native
*.ini = svn:mime-type=text/plain;svn:eol-style=native
*.java = svn:eol-style=native
*.jed = svn:mime-type=text/plain;svn:eol-style=native
*.jpg = svn:mime-type=image/jpeg
*.jsp = svn:eol-style=native
*.js = svn:eol-style=native
*.junit = svn:eol-style=native
*.m4 = svn:mime-type=text/plain;svn:eol-style=native
*.mif = svn:mime-type=text/plain;svn:eol-style=native
*.mod = svn:eol-style=native
*.ngc = svn:mime-type=application/octet-stream
*.pdf = svn:mime-type=application/pdf
*.pen = svn:eol-style=native
*.pl = svn:eol-style=native
*.png = svn:mime-type=image/png
*.ppr = svn:mime-type=text/plain;svn:eol-style=native
*.project = svn:eol-style=native
*.properties = svn:eol-style=native
*.py = svn:mime-type=text/plain;svn:eol-style=native
*.rb = svn:eol-style=native
*.rdf = svn:eol-style=native
*.rnc = svn:eol-style=native
*.rng = svn:eol-style=native
*.rnx = svn:eol-style=native
*.rtf = svn:mime-type=application/msword
*.sh = svn:mime-type=text/plain;svn:eol-style=native
*.svg = svn:mime-type=text/plain;svn:eol-style=native
*.tim = svn:mime-type=text/plain;svn:eol-style=native
*.tld = svn:eol-style=native
*.txt = svn:mime-type=text/plain;svn:eol-style=native
*.types = svn:eol-style=native
*.ucf = svn:mime-type=text/plain;svn:eol-style=native
*.v = svn:mime-type=text/plain;svn:eol-style=native
*.vh = svn:mime-type=text/plain;svn:eol-style=native
*.vhd = svn:mime-type=text/plain;svn:eol-style=native
*.vhdl = svn:mime-type=text/plain;svn:eol-style=native
*.vho = svn:mime-type=text/plain;svn:eol-style=native
*.xco = svn:mime-type=text/plain;svn:eol-style=native
*.xcat = svn:eol-style=native
*.xconf = svn:eol-style=native
*.xegrm = svn:eol-style=native
*.xgrm = svn:eol-style=native
*.xise = svn:mime-type=text/plain;svn:eol-style=native
*.xlex = svn:eol-style=native
*.xls = svn:mime-type=application/msexcel
*.xmap = svn:eol-style=native
*.xml = svn:mime-type=text/plain;svn:eol-style=native
*.xsd = svn:mime-type=text/plain;svn:eol-style=native
*.xsl = svn:mime-type=text/plain;svn:eol-style=native
*.xslt = svn:mime-type=text/plain;svn:eol-style=native
*.xsp = svn:mime-type=text/plain;svn:eol-style=native
*.xul = svn:mime-type=text/plain;svn:eol-style=native
*.mhs = svn:mime-type=text/plain;svn:eol-style=native
*.mss = svn:mime-type=text/plain;svn:eol-style=native
*.pao = svn:mime-type=text/plain;svn:eol-style=native
*.mpd = svn:mime-type=text/plain;svn:eol-style=native
*.bbd = svn:mime-type=text/plain;svn:eol-style=native
*.ldd = svn:mime-type=text/plain;svn:eol-style=native
*.pdd = svn:mime-type=text/plain;svn:eol-style=native
*.xje = svn:mime-type=text/plain;svn:eol-style=native

No comments: