Found 13 entries, viewing 1 through 5.

next

git command of the day: #10

git stash

This command throws all your working directory changes into a "stash", which can be later re-applied with the git stash apply command. This is nice when you're not ready to commit, but you need to get something else committed too. The example used in the documentation for this command is your big boss comes in and needs an emergency fix for something. Without git stash, the workflow to achieve the same result has more steps and can be more awkward.

So, I got up in the middle of programming working on a small, low priority project several months ago. I came back to it recently, and after reviewing what I had left, I decided I had merged something to my master branch that I didn't really want in place quite yet. I also had some changes in the working directory that hadn't been added to ...

Continue Reading

Permalink | 1 comment | Posted: Feb 03, 2010 | Tags: git

Smug Enhancements

Something I've had on my todo list for a very long time now was to get my notes from School published automatically on my website. They are already stored in ReStructured Text, and they are already stored in git repositories, so my use of smug already had me 95% of the way there. (I have a write-up about my note taking method: here)

I spent my day off, and finally found some better approaches to the problems I had, and I now have automatic sharing of my notes on my website.

The thing that was holding me back was the fact that smug couldn't do everything I wanted it to. I also store other things, such as homework, papers, and other assignments in the same git repository. Also, the way that I would organize a website is different than I would organize my personal files.

Here is an ...

Continue Reading

Permalink | 1 comment | Posted: Jun 13, 2009 | Tags: Django Open Source git Smug Python School Servers

Accessing git through a Firewall

A decent number of things are blocked where I work. SSH is not. I usually use git via SSH. I did want to clone someone's repo that was shared over the git protocol, so I typed in the git-clone command, and waited. It timed out. The quick fix would be to clone it to my home machine, and then clone it over ssh. I never like doing that though, I like origin being the actual origin. I decided that it shouldn't be too hard to get a clone to work, so I did a bit of googling. I figured that if git had any support for a proxy server, it'd be possible one way or another.

I figured that I could use a combination of the "netcat" utility and ssh to get the desired result. I found the following article: http://twopenguins.org/tips/git-through-proxy.php that ...

Continue Reading

Permalink | Posted: Mar 10, 2009 | Tags: git OCD Censorship

git command of the day: #9

git-mv

Git mv is a wonderful command. Here's how I've been using it.

I'm converting a mediawiki instance to a git repository with all the documents in RST. I used fuse-wikipediafs to grab each article. I added the text of each mediawiki article into a git repository under a subdirectory "wiki_markup". I am converting and verifying each document by hand. My workflow is like this:

git mv wiki_markup/Article.mw article.rst
gvim article.rst
git add article.rst
git commit -m "converted article"

This makes for a clean git commit history. The mediawiki markup is tied to the history of the restructuredtext file. When I do a git log on article.rst, I'll see that in its first commit it was renamed/updated in the same commit. This leaves a trail from the old mediawiki incarnation of this particular document that leads into the current ...

Continue Reading

Permalink | Posted: Feb 26, 2009 | Tags: git

git command of the day: #8

git update-server-info

I haven't forgotten about doing the git command of the day, I just haven't done it in a while.

While trying to clone a git repsitory on my bluehost account, I found that I couldn't use ssh nor the git protocol. I decided that it shouldn't be too unreasonable to expect to be able to clone a git repository over http. It is very much possible, but the http protocol isn't a very friendly place to try to implement the git protocol. The git protocol involves pack generation. A client requesting a file over http can't request that the pack be generated in the same way it would over the native git protocol. git update-server-info stores enough information in the repository to get the ball rolling for the client. It must be run any time the bare repo is updated. When the ...

Continue Reading

Permalink | Posted: Feb 11, 2009 | Tags: git
next