<?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>Autarchy of the Private Caverepository &#187;</title> <atom:link href="http://bogdan.org.ua/tags/repository/feed" rel="self" type="application/rss+xml" /><link>http://bogdan.org.ua</link> <description>Tiny bits of bioinformatics, [web-]programming etc</description> <lastBuildDate>Fri, 03 Feb 2012 22:51:18 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>gitosis: how to add new repository</title><link>http://bogdan.org.ua/2009/02/20/gitosis-how-to-add-new-repository.html</link> <comments>http://bogdan.org.ua/2009/02/20/gitosis-how-to-add-new-repository.html#comments</comments> <pubDate>Fri, 20 Feb 2009 19:05:52 +0000</pubDate> <dc:creator>Bogdan</dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[how-to]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[git]]></category> <category><![CDATA[gitosis]]></category> <category><![CDATA[project]]></category> <category><![CDATA[repository]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=606</guid> <description><![CDATA[I assume that you already have your gitosis-admin repository working (this is described elsewhere). cd gitosis-admin &#038;&#038; git pull &#8211; enter your gitosis administrative repository and ensure it is up-to-date $EDITOR gitosis.conf add [group newreponame] section (newreponame is the name of your new repository being added); add yourself with members = yourlogin@yourhost line; also add [...]]]></description> <content:encoded><![CDATA[<p>I assume that you already have your <strong>gitosis-admin</strong> repository working (this is described elsewhere).</p><ol><li><strong>cd gitosis-admin &#038;&#038; git pull</strong> &#8211; enter your gitosis administrative repository and ensure it is up-to-date</li><li><strong>$EDITOR gitosis.conf</strong></li><li>add <strong>[group newreponame]</strong> section (<em>newreponame</em> is the name of your new repository being added); add yourself with <strong>members = yourlogin@yourhost</strong> line; also add <strong>writable = newreponame</strong> line:<br
/><blockquote><p>[group newreponame]<br
/> members = yourlogin@yourhost<br
/> writable = newreponame</p></blockquote></li><li>based on my assumption of a correctly setup <strong>gitosis-admin</strong> repository, you should already have the appropriate public key in the <strong>keydir</strong> directory, but if not &#8211; copy your user&#8217;s ssh public key to <strong>keydir</strong> in the form of <strong>yourlogin@yourhostname.pub</strong>, then do <strong>git add keydir/yourlogin@yourhostname.pub</strong></li><li><strong>git commit -am &#8216;new repository: newreponame&#8217;</strong>; <strong>git push</strong>;</li><li>now that you have the new repo permissions configured, let&#8217;s actually create it. Navigate to the directory holding the files of your project (e.g. <strong>cd ~/newreponame</strong>), and do <strong>git init</strong>; <strong>git add .</strong> &#8211; this initializes empty git repository, and then adds all the files to it. If you have no files &#8211; you can skip the &#8216;git add .&#8217; command, as it will do nothing for you.</li><li><strong>git commit -m &#8216;initial commit&#8217;</strong>. If you had no files added to the commit, git will complain that it cannot create an empty commit. In this case use the command <strong>git commit &ndash;&ndash;allow-empty -m &#8216;initial commit&#8217;</strong></li><li><strong>git remote add origin ssh://gitosis@yourGitosisServerName/newreponame.git</strong></li><li><strong>git push &ndash;&ndash;all</strong></li><li>final thing: <strong>git config &ndash;&ndash;add branch.master.remote origin &#038;&#038; git config &ndash;&ndash;add branch.master.merge refs/heads/master</strong>; alternatively, <strong>cd .git &#038;&#038; $EDITOR config</strong>, and then add these lines:<br
/><blockquote><p>[branch "master"]<br
/> remote = origin<br
/> merge = refs/heads/master</p></blockquote><p>Without these lines, you won&#8217;t be able to <em>git pull</em>.</ol> ]]></content:encoded> <wfw:commentRss>http://bogdan.org.ua/2009/02/20/gitosis-how-to-add-new-repository.html/feed</wfw:commentRss> <slash:comments>13</slash:comments> </item> <item><title>Git: how to remove file and commit from history</title><link>http://bogdan.org.ua/2009/02/13/git-how-to-remove-file-commit-from-history.html</link> <comments>http://bogdan.org.ua/2009/02/13/git-how-to-remove-file-commit-from-history.html#comments</comments> <pubDate>Fri, 13 Feb 2009 19:21:32 +0000</pubDate> <dc:creator>Bogdan</dc:creator> <category><![CDATA[how-to]]></category> <category><![CDATA[Links]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[file]]></category> <category><![CDATA[git]]></category> <category><![CDATA[history]]></category> <category><![CDATA[remove]]></category> <category><![CDATA[repository]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=590</guid> <description><![CDATA[Once I accidentally added circa 300 MiB of archive files to one of my git repositories (which was as small as 5 MiB). I removed those files as soon as I noticed them, but the .git directory still preserved commits with those files, and still occupied over 300 MiB. I have found the solution at [...]]]></description> <content:encoded><![CDATA[<p>Once I accidentally added circa 300 MiB of archive files to one of my git repositories (which was as small as 5 MiB). I removed those files as soon as I noticed them, but the .git directory still preserved commits with those files, and still occupied over 300 MiB.</p><p>I have found the <a
href="http://stackoverflow.com/questions/307828/git-remove-file-accidentally-added-to-the-repository">solution</a> at <a
href="http://stackoverflow.com/">stackoverflow</a> (see also this <a
href="http://stackoverflow.com/questions/250238/collapsing-a-git-repositorys-history">question</a>).</p><p>This method worked for me, but I couldn&#8217;t push my rebased repository to the gitosis. I would need to re-init the gitosis repository from my rebased, but I&#8217;m not yet prepared to do that.</p><p>There is also a slightly different method (which relies on a temporary tag instead of a temporary branch), documented in Git online manual pages; I prefer the temporary branch method.</p><p>Below is a full copy-paste of the winning answer by Charles Bailey:</p><blockquote><p> # create and check out a temporary branch at the location of the bad merge<br
/> git checkout -b tmpfix <sha1-of-bad-merge-or-commit></p><p># remove the incorrectly added file<br
/> git rm somefile.orig</p><p># commit the amended merge<br
/> git commit &#8211;amend</p><p># go back to the master branch<br
/> git checkout master</p><p># replant the master branch onto the corrected merge<br
/> git rebase tmpfix</p><p># delete the temporary branch<br
/> git branch -d tmpfix</p></blockquote><p>Also, in my case <a
href="http://stackoverflow.com/questions/495345/git-removing-selected-commits-from-repository">this thread</a> at stackoverflow was highly useful. I start enjoying the concise and compact style of Charles Bailey <img
src='http://bogdan.org.ua/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> :<br
/> <span
id="more-590"></span></p><blockquote><p> # detach head and move to D commit<br
/> git checkout <SHA1-for-D></p><p># move HEAD to A, but leave the index and working tree as for D<br
/> git reset &#8211;soft <SHA1-for-A></p><p># Redo the D commit re-using the commit message, but now on top of A<br
/> git commit -C <SHA1-for-D></p><p># Re-apply everything from the old D onwards onto this new place<br
/> git rebase &#8211;onto HEAD <SHA1-for-D> master</p></blockquote><p>Note: this example is for a branch of commits R&#8211;A&#8211;B&#8211;C&#8211;D&#8211;E&#8211;HEAD, where commits B &#038; C should be removed from commit history.</p><p>Another option is to use git rebase &#8211;interactive (for the same example):</p><blockquote><p> git rebase -i HEAD~5</p></blockquote><p>Unfortunately, rebasing on a public (pushed out) branch has no effect for other users of the current gitosis repository.</p><p>An alternative to re-initializing gitosis repository from rebased scratch could be switching to a different (rebased) branch, and deleting the outdated master branch; but I haven&#8217;t investigated if this works.</p> ]]></content:encoded> <wfw:commentRss>http://bogdan.org.ua/2009/02/13/git-how-to-remove-file-commit-from-history.html/feed</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Using GIT version control system</title><link>http://bogdan.org.ua/2008/12/25/using-git-version-control-system.html</link> <comments>http://bogdan.org.ua/2008/12/25/using-git-version-control-system.html#comments</comments> <pubDate>Thu, 25 Dec 2008 21:19:02 +0000</pubDate> <dc:creator>Bogdan</dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[Links]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[darcs]]></category> <category><![CDATA[distributed]]></category> <category><![CDATA[git]]></category> <category><![CDATA[gitosis]]></category> <category><![CDATA[mercurial]]></category> <category><![CDATA[repository]]></category> <category><![CDATA[svn]]></category> <category><![CDATA[VCS]]></category> <category><![CDATA[version control system]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=468</guid> <description><![CDATA[One of my projects &#8211; COTRASIF &#8211; has grown complex enough to necessitate the use of version control system (VCS). The most frequently mentioned is definitely SVN (SubVersion). However, with a characteristic scrupulosity, I decided to run my own comparison of the available tools. I had a look at Darcs, Mercurial, SVN, and Git. Of [...]]]></description> <content:encoded><![CDATA[<p>One of my projects &#8211; <a
href="http://biomed.org.ua/COTRASIF/">COTRASIF</a> &#8211; has grown complex enough to necessitate the use of version control system (VCS).</p><p>The most frequently mentioned is definitely SVN (<a
href="http://subversion.tigris.org/">SubVersion</a>).</p><p>However, with a characteristic scrupulosity, I decided to run my own comparison of the available tools. I had a look at <a
href="http://darcs.net/">Darcs</a>, <a
href="http://mercurial.selenic.com/wiki/">Mercurial</a>, <a
href="http://subversion.tigris.org/">SVN</a>, and <a
href="http://git-scm.com/">Git</a>. Of these, only SVN is not a distributed VCS (but there is SVN addon which adds distributed features to SVN). Unfortunately, I didn&#8217;t take any notes during comparison, so there will be no details on how the choice narrowed down to <strong>Mercurial vs Git</strong>. These dVCSs are quite similar, with the following major differences: Mercurial is better documented and (much?) easier to use than Git; Git is more feature-rich, and Git currently has more add-on modules. Here the differences almost end. I decided that learning curves never were an obstacle, so Git is currently my first distributed VCS of choice (please note: I&#8217;ve never before used any version-control systems).</p><p>After choosing Git, I had to install Git central repository on a server. (Yes, Git is distributed, but central repository on the always-on server is a convenience worth the trouble; and again, this adds yet another backup copy.)</p><p>This is a collection of resources I found useful when setting up my Git repository:</p><ol><li><a
href="http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way">Hosting Git repositories, easy and secure way</a> (note: do not create the user manually, installation of gitosis package does that for you automagically).</li><li><a
href="http://casperfabricius.com/site/2008/09/21/keeping-git-repositories-on-dreamhost-using-ssh/">Setting up Git repository on Dreamhost</a>.</li><li><a
href="http://bogdan.org.ua/2009/02/20/gitosis-how-to-add-new-repository.html">gitosis: how to add new repository</a></li></ol><p>Some more resources on how to use Git:</p><ol><li><a
href="http://www.kernel.org/pub/software/scm/git/docs/user-manual.html" class="broken_link" rel="nofollow">Git user manual</a></li><li><a
href="http://wiki.sourcemage.org/Git_Guide">Git guide</a></li><li><a
href="https://wincent.com/wiki/Git_recipes">Git recipes</a> (branching and merging in examples)</li><li><a
href="http://www.kernel.org/pub/software/scm/git/docs/everyday.html" class="broken_link" rel="nofollow">everyday Git with 20 commands</a></li><li><a
href="http://net.tutsplus.com/tutorials/other/easy-version-control-with-git/">version control with git &#8211; tutorial</a></li></ol><p><ins
datetime="2008-12-30T19:42:40+00:00">Update:</ins> Git is simple enough to get started in minutes. So far I had only used clone/push/pull/commit/gc commands, but I&#8217;m familiar with tag/branch/checkout commands. The drawback of insufficient documentation (as mentioned above) isn&#8217;t really a problem now. I&#8217;m not using any GUIs for git (as sometimes I&#8217;m working on a remote server via ssh), but of the three locally tried GUIs I liked <strong>gitk</strong> the most; both <strong>git-gui</strong> and <strong>qgit </strong> feel less convenient than <strong>gitk</strong>, but are approximately equal. I wish I had some SVN/Mercurial/Darcs experience to be able to recommend Git &#8211; but I don&#8217;t have that <img
src='http://bogdan.org.ua/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p> ]]></content:encoded> <wfw:commentRss>http://bogdan.org.ua/2008/12/25/using-git-version-control-system.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
