git wonders never cease. This page describes how to use git rebase -i to split commits. (Thanks Chris Lalancette and Stephen Tweedie).
Stephen notes also: “git diff –cached isn’t mentioned in that git-rebase page, but it’s an invaulable part of the process”. Use git diff –cached during the splitting process to see which [...]
Posts Tagged as ‘git’
September 30, 2009
git: Splitting commits
July 27, 2009
Quick git tip: Push only some commits to your upstream repo
git status says:
$ git status
# On branch master
# Your branch is ahead of ‘origin/master’ by 2 commits.
You want to git push only one of those commits to the public repo. Here’s how:
First use git log to get the commit hash of the commit you want to push. Then:
$ git push origin <thelonghash>:master
(Thanks to [...]
March 6, 2009
auto-buildrequires
I just pushed a new release of auto-buildrequires, a super little tool for finding the BuildRequires that your package needs automatically. Just replace rpmbuild with auto-br-rpmbuild:
$ auto-br-rpmbuild -ta auto-buildrequires-0.9.tar.gz
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.wphzM5
[ lots of stuff here ... ]
+ exit 0
BuildRequires: bash = 3.2.30.fc10.x86_64
BuildRequires: binutils = 2.18.50.0.9.8.fc10.x86_64
BuildRequires: coreutils = 6.12.19.fc10.x86_64
BuildRequires: cpio = 2.9.90.2.fc10.x86_64
BuildRequires: diffutils = [...]
March 6, 2009
git “fatal: no matching remote head”
git clone is the command you use to clone and start working with a remote repository. Only problem is, this command does not work if the remote repository is empty. Instead it responds with this cryptic error message:
$ git clone ssh://git.fedorahosted.org/git/autobuildrequires.git
Initialized empty Git repository in autobuildrequires/.git/
fatal: no matching remote head
I sent a rant [...]