On Wednesday, October 24, 2012 11:14:55 PM UTC+2, Joe Cabezas wrote:

> hello!
> i want to show uncommited changes using git instaweb, but instaweb only 
> shows commited changes...
> i just want to show the git diff output to someone easy..., there is any 
> alternatives to git instaweb?, thank you

Interesting question. With a little trickery, you can get instaweb to do 
what you want.

Here's an example, I'll say I'm working on a repository ~/projects/gitblit

Step 1: Set up a temporary git repo to run instaweb and share your 
work-in-progress (WIP), and by that I mean your uncommitted changes:

cd ~/temp
git clone ~/projects/gitblit
cd gitblit
git config receive.denyCurrentBranch ignore #so we can push into this repo 
from our working repo
git instaweb

Now check that it's running properly on http://localhost:1234/

Step 2: Commit your working repo local changes into the sharing repo you 
just created, while leaving them intact in your working repo:

cd ~/projects/gitblit
# make some changes
git push -f ~/temp/gitblit master && GIT_DIR=~/temp/gitblit/.git git add -A 
&& git commit -m "WIP"

Now check that there's a new commit called "WIP" on top 

The one-liner above (you might consider saving it in a script of sorts) 
does the following:

a) git push -f.. this resets the shared/instaweb repo to have the same 
state as your working repo
b) Sets GIT_DIR to the shared repo, meaning it will be used for the next 

Will that work for you?

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To view this discussion on the web visit 
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to