<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="pt-BR">
	<id>http://wiki.nosdigitais.teia.org.br/index.php?action=history&amp;feed=atom&amp;title=GitSvn</id>
	<title>GitSvn - Histórico de revisão</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.nosdigitais.teia.org.br/index.php?action=history&amp;feed=atom&amp;title=GitSvn"/>
	<link rel="alternate" type="text/html" href="http://wiki.nosdigitais.teia.org.br/index.php?title=GitSvn&amp;action=history"/>
	<updated>2026-04-20T22:14:40Z</updated>
	<subtitle>Histórico de revisões para esta página neste wiki</subtitle>
	<generator>MediaWiki 1.39.0</generator>
	<entry>
		<id>http://wiki.nosdigitais.teia.org.br/index.php?title=GitSvn&amp;diff=6217&amp;oldid=prev</id>
		<title>V1z: /* Using Git with VXL */</title>
		<link rel="alternate" type="text/html" href="http://wiki.nosdigitais.teia.org.br/index.php?title=GitSvn&amp;diff=6217&amp;oldid=prev"/>
		<updated>2012-07-20T16:27:39Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Using Git with VXL&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;pt-BR&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Edição anterior&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Edição das 13h27min de 20 de julho de 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Linha 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Linha 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;= Using Git with VXL =&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;See also [[Git]].&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;See also [[Git]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>V1z</name></author>
	</entry>
	<entry>
		<id>http://wiki.nosdigitais.teia.org.br/index.php?title=GitSvn&amp;diff=6216&amp;oldid=prev</id>
		<title>V1z: import from https://sourceforge.net/apps/trac/vxl/wiki/GitSvn</title>
		<link rel="alternate" type="text/html" href="http://wiki.nosdigitais.teia.org.br/index.php?title=GitSvn&amp;diff=6216&amp;oldid=prev"/>
		<updated>2012-07-20T16:27:24Z</updated>

		<summary type="html">&lt;p&gt;import from https://sourceforge.net/apps/trac/vxl/wiki/GitSvn&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Página nova&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Using Git with VXL =&lt;br /&gt;
See also [[Git]].&lt;br /&gt;
&lt;br /&gt;
== What is Git ==&lt;br /&gt;
Git [http://git-scm.org git-scm.org] is a widely used distributed version control system.&lt;br /&gt;
It is used by the Linux Kernel, X.org, Android, Perl, Qt, Gnome, and other projects.&lt;br /&gt;
&lt;br /&gt;
== Why Git ==&lt;br /&gt;
&lt;br /&gt;
Git gives each developer a local copy of the entire development history (while being space efficient).  Git is&lt;br /&gt;
very fast and scales well even when working with large projects and long&lt;br /&gt;
histories. This is great for vxl-scale. It is hard to imagine how liberating&lt;br /&gt;
it is to have the entire project history at hand, mere fractions of&lt;br /&gt;
a second away, until you have experienced it. &lt;br /&gt;
&lt;br /&gt;
Git branching is very cheap, effectively making for a completely new development&lt;br /&gt;
style. The developer can work on many features in parallel, without one code&lt;br /&gt;
branch interfering with the other. For each feature the developer is working on, he&lt;br /&gt;
can work with sub-teams of other developers before having to commit to the&lt;br /&gt;
central server. Merging of all these branches is an easy, fast, and well-defined operation.&lt;br /&gt;
Support for cherry-picking changes is very good.&lt;br /&gt;
&lt;br /&gt;
== Learning Git ==&lt;br /&gt;
This guide assumes you already know Git. One roadmap to learn Git it is to read, in order:&lt;br /&gt;
 * [http://git-scm.com/course/svn.html Git Crash Course for SVN users]&lt;br /&gt;
 * [http://www.cl.kernel.org/pub/software/scm/git/docs/v1.6.0.6/gittutorial.html Git Tutorial]&lt;br /&gt;
 * [http://progit.org/ Pro Git]: an extensive book about git. Online version is available. Read all of it, esp. chapters 2 and 3, skimming through the last chapters.&lt;br /&gt;
&lt;br /&gt;
Honestly, learning Git is not just mapping commands from Subversion. It is a more powerful system, with new concepts that must be learned by careful reading and experimentation.&lt;br /&gt;
&lt;br /&gt;
== Basic Configuration ==&lt;br /&gt;
&lt;br /&gt;
Basic user info:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  $ git config --global user.name &amp;quot;FirstName LastName&amp;quot;&lt;br /&gt;
  $ git config --global user.email myuser@mydomain.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Output coloring:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  $ git config --global color.diff auto&lt;br /&gt;
  $ git config --global color.status auto&lt;br /&gt;
  $ git config --global color.branch auto&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Interfacing to VXL ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  $ git svn clone --username mysourceforgeuser -v -s https://vxl.svn.sourceforge.net/svnroot/vxl&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This can literally take hours or even days to finish. But it is only a first&lt;br /&gt;
time procedure.&lt;br /&gt;
&lt;br /&gt;
The -s option above assumes the layout is: branches, trunk, tags.&lt;br /&gt;
&lt;br /&gt;
Like a Subversion checkout, you now have a local copy of your project. Unlike a&lt;br /&gt;
Subversion checkout, you also have a local copy of the entire history of the&lt;br /&gt;
project.&lt;br /&gt;
&lt;br /&gt;
Periodically, you should get online and fetch the latest changes from the svn&lt;br /&gt;
server:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  $ git svn rebase   # think &amp;quot;svn update&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Submit your commits to the server with:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  $ git svn dcommit  # think &amp;quot;svn commit&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Although you can easily do local branching and merging, it’s generally best to&lt;br /&gt;
keep your history as linear as possible by rebasing your work and avoiding doing&lt;br /&gt;
things like simultaneously interacting with a Git remote repository.&lt;br /&gt;
&lt;br /&gt;
=== Example of workflow ===&lt;br /&gt;
&lt;br /&gt;
Create a new branch (I name it 'work'), do all my off-line work in that branch&lt;br /&gt;
and then merge work into master and then do svn dcommit.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  $ git checkout -b work # create a new branch&lt;br /&gt;
  .....# work and make commits&lt;br /&gt;
  $ git checkout master&lt;br /&gt;
  $ git svn fetch&lt;br /&gt;
  $ git rebase master work&lt;br /&gt;
  $ git checkout master&lt;br /&gt;
  $ git merge work&lt;br /&gt;
  $ git svn dcommit&lt;br /&gt;
&lt;br /&gt;
If the commit fails you can simply do -&lt;br /&gt;
&lt;br /&gt;
  $ git reset --hard HEAD # clean the index&lt;br /&gt;
  $ git rebase master work&lt;br /&gt;
  # follow the rest of the commands from above after resolving the problems&lt;br /&gt;
&lt;br /&gt;
== Practical Experience ==&lt;br /&gt;
&lt;br /&gt;
Git is space efficient. As of October 2009, the git repository (with full history) is 238 MB, while the svn checkout is 295MB.&lt;br /&gt;
&lt;br /&gt;
The initial import took about 9h from the West Coast, according to a developer, as of October 2009. Mirroring the subversion repository and only then importing to Git would be a faster approach.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
 * [http://progit.org/ Pro Git]: an extensive book about git. Online version is available.&lt;br /&gt;
 * [http://google-opensource.blogspot.com/2008/05/develop-with-git-on-google-code-project.html Google Open Source Blog].&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
If your lab has a private CVS repository, you can also use Git. See the wiki page GitCvs.&lt;br /&gt;
&lt;br /&gt;
== Questions ==&lt;br /&gt;
&lt;br /&gt;
If you have any questions, feel free to contact Ricardo Fabbri (ricardofabbri at users.sf.net) or the vxl-users list.&lt;br /&gt;
&lt;br /&gt;
[[Category:Lab Macambira]]&lt;/div&gt;</summary>
		<author><name>V1z</name></author>
	</entry>
</feed>