git instaweb

Updated: 22 October 2023

Instantly browse your working repository in gitweb. A simple script to set up gitweb and a web server for browsing the local repository.

By default, instaweb will look for the lighttpd web-server, see

You will need to install gitweb first

sudo apt install gitweb

Run the instaweb script

git instaweb --start

Browse to

Stop instaweb

git instaweb --stop
Categories git

git bisect

Updated: 27 August 2023

Start a bisect session

git bisect start

Pass git a commit where the problem is apparent

git bisect bad HEAD

and a good commit, sometime earlier

git bisect good fcd61994

Inspect / test the code, then inform git

git bisect good # or
git bisect bad

Finish the session

git bisect reset
Categories git

git checkout

Updated: 12 August 2023

Checkout a single file from a specific commit

git checkout <COMMIT> path/to/the/file
Categories git

git search

Updated: 06 July 2023

Search the text (case insensitive) of commit messages in all branches

git log --all -i --grep='text to find'
Categories git

git pull request

Updated: 08 May 2023

Fetch a GitHub pull-request to your local repo

git fetch origin pull/<pull request id>/head:<branch name to use>

git status

Updated: 01 February 2023

Show individual files in untracked directories

git status -u
Categories git

git config

Updated: 22 April 2023

Username and email

git config --global "John Doe"
git config --global ""


git config --global color.status.updated magenta
git config --global color.status.untracked magenta
git config --global color.diff.old magenta
Categories git

git rebase

Updated: 24 May 2023

Rebase onto

git rebase --onto newbase from-commit-after branch-to-move

If required to squash into the first commit of a repository

git rebase --interactive --root
Categories git