With over 100 Git working copies, I wanted something to let me know what I had forgotten to commit or push. This is a basic approach.
The APIs are so powerful, finding the simple approach took time.
With over 100 Git working copies, I wanted something to let me know what I had forgotten to commit or push. This is a basic approach.
The APIs are so powerful, finding the simple approach took time.
git checkout --orphan NEWBRANCH git rm -rf . touch .gitignore git commit -a -m ""
Via bitflop.
Addendum: 2014-02-28:
Create an orhan branch git checkout --orphan lp git rm -rf . touch .gitignore git add .gitignore git diff --cached git commit -m "Initial import." Create a remote branch git push -u origin lp Obtain a remote branch git checkout -b lp Delete a branch Remote: git push origin :lp Local: git branch -D lp
As a Subversion master-user I was hoping for a lot from \_Pro Git and was rewarded greatly. The author gives Git a fair shake without throwing Subversion under the bus. He does a great job teaching not just the tools, but the culture and “how to think” the Git way. The latter is devoid in literally every tutorial I’ve seen online, and I’m not sure it is even possible to sum it up in anything less than the entirety of this book. The length is just fine, chapter are brief, terse, light, and information packed. The multitude of tools and approaches revealed in the book make it worth reading, and buying, too. Although the book is free online, the author should be rewarded with a purchase. Before reading this I spent 5 months using Git with the typical docs: man pages, stackoverflow.com, and random posts. This book pulled everything together, it was kind of like sitting with a hacker who really groks it all (as you will see in the last chapter), and that alone is priceless. 5/5
Addendum: the formatting and graphics in the Kindle version look excellent (forgot to mention this key point as not all Kindle books look this great).
Here is a nice and simple guide to Git.
What is a good OS X Subversion client?
Paul recommended this.
With all of the distributed VCSs out there Subversion tends to get shunned these days; but people seem to forget that sometimes dead simple is sometimes more than good enough. Besides, you can use git and bzr with svn just fine.
Here is a good presentation about the Subversion C API.
I attended it at OSCON 2006; which was all around a lot of good fun.
Bzr is nice to use. It is tailored for the masses (of which I am a member). It has the usual UNIX support, but it has first-class Windows support, too. It has a nice UI if you want it. The community is great, too.
A few days ago I installed it on OS X and found that there was no UI support via Qt. Fortunately there are directions for setting it up here. Here are the steps that I followed:
Now I am wondering if I should have just installed this using MacPorts.
Addendum: 06/21/09
Here are the directions that I followed from that link:
In order to install PyQt, you need to have SIP installed. 1) download and install QT4.x 2) get SIP from http://www.riverbankcomputing.co.uk/sip/download.php $> python configure.py -d /Library/Python/2.5/site-packages $> make $> sudo make install 3) get PyQT from http://www.riverbankcomputing.co.uk/pyqt/download.php $> python configure.py -q /bin/qmake -d /Library/Python/2.5/site-packages $> make $> sudo make install Hope this helps to get qbzr working
BZR as of today works with Python 2.4 or greater. Leopard comes with both 2.3 and 2.5 installed; but defaults to 2.5.
I didn’t know where qmake was installed; and typing ’type -a qmake’ seemed to be the quickest way to find it.
Although Subversive is the official Eclipse Subversion provider, the plugin itself doesn’t behave very well. In particular, it is impossible to uninstall it (v0.7) using the “Software Updates” dialog. The only option is to delete the jar files yourself (in 2001 I remember hoping that soon, we wouldn’t have to do stuff like this). Here are the files to delete:
(Disclaimer: this worked for me, I make no promises for what it might do to your Eclipse installation)
org.eclipse.team.svn.core_0.7.5.I20081029-1900.jar org.eclipse.team.svn.help_0.7.5.I20081029-1900.jar org.eclipse.team.svn.resource.ignore.rules.jdt_0.7.5.I20081029-1900.jar org.eclipse.team.svn.ui_0.7.5.I20081029-1900.jar org.eclipse.team.svn_0.7.5.I20081029-1900.jar org.polarion.eclipse.team.svn.connector.javahl15_2.0.5.I20081024-1200.jar org.polarion.eclipse.team.svn.connector.javahl_2.0.5.I20081024-1200.jar org.polarion.eclipse.team.svn.connector.svnkit15_2.0.5.I20081024-1200.jar org.polarion.eclipse.team.svn.connector.svnkit_2.0.5.I20081024-1200.jar org.polarion.eclipse.team.svn.connector_2.0.5.I20081024-1200.jar
Today I needed to convert a Subversion working copy (aka a checkout) into an export. Recursively blowing away all of the .svn directories in DOS (Windows XP) didn’t seem to be straightforward so I ended up using UNIX find in cygwin. Here is the command:
find . -type d -name '.svn' -exec rm -rf {} \;
The command was provided here, and the following is documentation from the man page.