<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>texstudio &#8211; RiTM</title>
	<atom:link href="https://ritm.knu.ua/tag/texstudio/feed/" rel="self" type="application/rss+xml" />
	<link>https://ritm.knu.ua</link>
	<description>Research in Theory of Magnetism</description>
	<lastBuildDate>Sat, 23 Dec 2017 11:33:45 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.1</generator>
<site xmlns="com-wordpress:feed-additions:1">102601221</site>	<item>
		<title>How to Use Git with TexStudio</title>
		<link>https://ritm.knu.ua/general/how-to-use-git-with-texstudio/</link>
					<comments>https://ritm.knu.ua/general/how-to-use-git-with-texstudio/#comments</comments>
		
		<dc:creator><![CDATA[engraver]]></dc:creator>
		<pubDate>Sun, 27 Sep 2015 15:18:55 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[tex]]></category>
		<category><![CDATA[texstudio]]></category>
		<guid isPermaLink="false">http://ritm.knu.ua/?p=1747</guid>

					<description><![CDATA[TexStudio is our favorite TeX editor. It works with only SVN version system. Nevertheless, using macroses one can teach it to work with Git also. To do it, one needs to create three new scripts Macros -&#62; Add/Change in the file menu. Get from server %SCRIPT buildManager.runCommand("git pull ", editor.fileName())…<p class="continue-reading-button"> <a class="continue-reading-link" href="https://ritm.knu.ua/general/how-to-use-git-with-texstudio/">Continue reading<i class="crycon-right-dir"></i></a></p>]]></description>
										<content:encoded><![CDATA[<p>TexStudio is our favorite TeX editor. It works with only SVN version system. Nevertheless, using macroses one can teach it to work with Git also. To do it, one needs to create three new scripts Macros -&gt; Add/Change in the file menu.</p>
<p><strong>Get from server</strong></p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">%SCRIPT 
buildManager.runCommand("git pull ", editor.fileName())</pre>
<p><span id="more-1747"></span><br />
<strong>Commit</strong></p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">%SCRIPT 
dialog = new UniversalInputDialog() 
dialog.setWindowTitle("Git commit / push") 
dialog.add("Commited by Olek P", "Comment", "comment") 
if (dialog.exec() != null) {
     comment = dialog.get("comment")
     buildManager.runCommand("git commit -a -m \"" + comment + "\"", editor.fileName())
}</pre>
<p><strong>Upload to server</strong></p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">%SCRIPT 
buildManager.runCommand("git push origin master", editor.fileName())</pre>
<p>Windows users must change path to git. For example the last script should look like following:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">%SCRIPT 
buildManager.runCommand("\"C:\\Program Files\\Git\\bin\\git.exe\" push origin master", editor.fileName())</pre>
<p>&nbsp;</p>
<p><strong>UPD 21/12/2017</strong></p>
<p><strong>Show git log</strong></p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">%SCRIPT
buildManager.runCommand("showlog.sh", editor.fileName())
</pre>
<p>Here script showlog.sh is the following:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="shell">#!/bin/bash
FNAME='log.log' # temporary file
TEXTED='kwrite' # default text editor

git log --pretty=format:'%h : %s | Time: %cd' --graph &gt; ${FNAME} &amp;&amp; ${TEXTED} ${FNAME}
</pre>
<p><strong>Compare two commits:</strong></p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">%SCRIPT
dialog = new UniversalInputDialog()
dialog.setWindowTitle("Choose commit:")
dialog.add("HEAD", "Recent version", "commit1")
dialog.add("HEAD^", "Elder version", "commit2")
if (dialog.exec() != null) {
commit1 = dialog.get("commit1")
commit2 = dialog.get("commit2")
buildManager.runCommand("git difftool " + commit1 + " " + commit2 + " --no-prompt ", editor.fileName())
}</pre>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://ritm.knu.ua/general/how-to-use-git-with-texstudio/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1747</post-id>	</item>
	</channel>
</rss>
