Saturday, December 05, 2009

Two little Git helpers

Git is really powerful but some of its commands can be very obtuse. Two little helpers I have in my .gitconfig that I thought some of you might find useful are

[alias]
uncommit 
reset --soft HEAD^
unstage reset HEAD 

The uncommit will back out the last non-pushed commit. Unstage will do as it says, remove a file from the staging buffer.

The alias section is a great place for your shortcuts.

 

Posted by Stu on 12/05/2009 at 11:18 PM Permalink to this post.
Filed Under : ComputersDevelopment
Comments are closed There are no comments on this entry.
Tags: ,

Wednesday, January 23, 2008

Git and Cracks and Crevices, 7 Day Roguelikes blah blah blah

I’m slowly migrating my development work from bazaar to git as my version control system of choice. The first time I tried git I did not like it, but the newer versions are much nicer and so far, I’m not looking back.

I had to muck with repository permissions to get gitweb working correctly. meh. http://bloodycactus.com/git gives you a web view of the repo/commit info etc.

Its very… disconcerting to do a commit AND push have it return instantly where bazaar would just… work its magic and come back after a minute or two. The speed difference is truly amazing, and for the most part I have kept the exact same work flow, all I needed to add was a push step after I commit. Obviously bazaar was pushing the entire file over sftp and git is only pushing the deltas but even for small files thats a huge difference.

It would be nice if when I did a commit, like bazaar, it auto gpg signed my commit.

Right now I have a public read-only git repository for one of my roguelikes and write permissions for me using gitosis, making Cracks and Crevices my test project, which you can pull from

git clone git://bloodycactus.com/cnc.git

On to other game development news, I’ve made my redmine install available publicly now too (here). This puts the bug and issue tracker, wiki, etc all open to the public in a read only mode.

Since I am keeping all the design notes in the wiki for Fishguts, I made its user status private (it has the walkthrough and all the other import bits in it, and I cant restrict what pages are public and non-public)... I think what I really need is just to have a secondary private project whereby the wiki is all I use in it so all the issues and other bits are public sans the wiki.

Hmm I need to think of an idea for this years 7 Day Roguelike (7DRL) competition. I can reuse the framework of CnC, just need to re-write it.

 

 

Posted by Stu on 01/23/2008 at 10:02 PM Permalink to this post.
Filed Under : ComputersDevelopmentCracks and CrevicesFishguts
Comments are closed There are no comments on this entry.
Tags: , ,

Sunday, October 21, 2007

Converting from Bazaar to GIT

I’ve been poking around with GIT and thought I would do a test and convert one of my repos over.

After a LOT of messing about and false starts I managed to figure out what Tailor was trying to do, I converted one of my bzr repors.

Yes its nice and fast. Some things are like huh?  If I want to revert my changes I have to check them out… revert does something else.

I want to like it.. it just doesnt fit to my needs. I cant bind to a master repository, I have to push.. and I’m forgetful, I remember to commit but doing a push is an extra step.

and the biggest downside, you need a ‘smart’ transport, aka git running as a server on the backend, which is useless to me since I cant run servers on my hosting account.

So for the meantime I’ll be sticking with bzr and sftp pushing…

Interesting but right now, not for me.

Posted by Stu on 10/21/2007 at 04:27 PM Permalink to this post.
Filed Under : ComputersDevelopment
Comments are closed There are no comments on this entry.
Tags: , ,

Monday, April 09, 2007

bazaar vs svn

So bazaar has been working fine for me (0.15) and I can push to my host via sftp and all is sweet… Only I cant push from work, no ssh/sftp ports open.. :(

Which begs the question, to which I am debating…

Do I payup my subversion hosting (which I had expressly for just usinb SVN since my host doesnt run svn server)... or do I convert all my svn to bzr? and pay one less hosting fee?

I think I will archve my svn repo and just migrate to bzr. It would be nice to convert my repo with svn2bzr, my because my svn host restricted me to 1 repo, all my projects are in there by directory, rather than 1 project per directory, and I dont really want to convert everything into 1 huge bzr repo.

I should be able to pass in the bottom level project and have svn2bzr pull only that out to a new repo, so I guess I can do some testing tonight and see whats what…

 

Posted by Stu on 04/09/2007 at 11:48 AM Permalink to this post.
Filed Under : ComputersDevelopment
Comments are closed There are no comments on this entry.
Tags: , ,

Wednesday, April 04, 2007

Bazaar

With all the talk lately of bazaar-ng, I thought I’d take a look. I use svn all the time at home but I thought I would take a look at bzr.

Seems pretty nice, so I did a test and tried to push to my server… I can ssh and sftp fine into my server but bzr kept giving me permission denied. I went on with sftp and created the directory, chmod 0777 and still permission denied…

argh. whats going on… so I spent several hours repeating the same trick..

when I sftp in, I’m by default in my homedir…

bzr seems to put me in the root!  so sftp://blah/dir was looking for /dir.. NOT ~/dir! doh…

so when I realised that I just threw in a ~ and it all worked ok… now its a shame my work blocks port 22 :(

It does seem a bzr push is a lot slower than a svn commit for a completly new repository.

I just need to learn a little workflow.

I’m used to doing
svn up
blah
svn ci -m “blah”

(I also love the fact I can sftp push to my host and not pay extra hosting fee’s like I currently do with svn!)

 

Posted by Stu on 04/04/2007 at 10:42 PM Permalink to this post.
Filed Under : ComputersDevelopment
Comments are closed There are no comments on this entry.
Tags: , ,
Page 1 of 1 pages