$ git branch --set-upstream master barrel/master
you can use git aliases to create your own git subcommands. here's an example of creating a very useful git lola
subcommand: http://blog.kfish.org/2010/04/git-lola.html
http://blog.apiaxle.com/post/handy-git-tips-to-stop-you-getting-fired/ - Handy Git tips to stop you getting fired
https://gist.github.com/jbenet/ee6c9ac48068889b0912 - a simple git branching model. a nice antidote to a few very complicated models I've seen floating around.
$ cd $ git init . $ git remote add caboteria ssh://user@host/path_to_repo/dotfiles.git $ git fetch caboteria mitre:caboteria/mitre $ git checkout -fb mitre caboteria/mitrehttp://vcs-home.madduck.net/ - turns out there's a group of people that talk about how they've done this.
~/.gitconfig
to tell git to use a proxy by default but to talk directly to machines inside your firewall:
[core] gitproxy = "none" for "your-company-domain.com" gitproxy = git-proxyCreate a
git-proxy
executable file somewhere on your path (~/bin
or maybe /usr/local/bin
). Here's the contents of my ~/bin/git-proxy
file:
#!/bin/sh echo "proxy to $1:$2 via ec2" >&2 exec ssh ec2 nc "$1" "$2"In my case "ec2" is a host on the public internet that I have set up passwordless ssh access to. You'll need to use a different host. I usually don't like to have programs like this output anything, but in this case I emit one line because the proxy should run sometimes but not others so it's handy to see whether git has decided to run it or not. The only downside of this is that you need to use fully-qualified domain names for machines in your corporate domain, because git uses the domain name to decide whether to use the proxy or not.