Difference: GitNotes (1 vs. 7)

Revision 726 Mar 2015 - TobyCabot

Line: 1 to 1
 
META TOPICPARENT name="ProgrammingBookmarks"
http://news.ycombinator.com/item?id=2179123 - excellent intro to version control and git
http://progit.org/book/ - git book (online and available in print)
Line: 70 to 70
 /usr/bin/ssh -vvv "$@" Tell git to use this script with the GIT_SSH environment variable.
Added:
>
>

rewriting history

https://www.kernel.org/pub/software/scm/git/docs/git-filter-branch.html

git filter-branch --index-filter 'git rm --cached --ignore-unmatch filename' HEAD
 \ No newline at end of file

Revision 602 Aug 2014 - TobyCabot

Line: 1 to 1
 
META TOPICPARENT name="ProgrammingBookmarks"
http://news.ycombinator.com/item?id=2179123 - excellent intro to version control and git
http://progit.org/book/ - git book (online and available in print)
Line: 6 to 6
 http://jointheconversation.org/2008/06/02/railsconf-git-talk/ - excellent introductory screencast. about an hour long, but well worth it
http://macournoyer.wordpress.com/2007/12/27/moron-no-more-i-can-git/ - a nice intro to using git-svn.
http://www.sanityinc.com/articles/partial-emacs-git-svn-mode - some tips for emacs and git-svn
Changed:
<
<
http://www.newartisans.com/blog_files/git.from.bottom.up.php - git from the bottom up
http://www.eqqon.com/index.php/Collaborative_Github_Workflow
>
>
http://newartisans.com/2008/04/git-from-the-bottom-up/ - git from the bottom up
  If you're trying to use a non-default ssh key with git (e.g. for github) then this will help: http://help.github.com/multiple-keys/
Line: 62 to 61
 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. \ No newline at end of file

Added:
>
>

cron

git, ssh, and cron can be a fussy combination. When debugging crontab's that involve git and ssh, it's often helpful to wedge a small script between git and ssh:

#!/bin/bash
/usr/bin/ssh -vvv "$@"
Tell git to use this script with the GIT_SSH environment variable.

Revision 527 Sep 2013 - TobyCabot

Line: 1 to 1
 
META TOPICPARENT name="ProgrammingBookmarks"
http://news.ycombinator.com/item?id=2179123 - excellent intro to version control and git
http://progit.org/book/ - git book (online and available in print)
Line: 17 to 17
  http://blog.apiaxle.com/post/handy-git-tips-to-stop-you-getting-fired/ - Handy Git tips to stop you getting fired
Added:
>
>
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.
 

dotfiles

You can store your "dotfiles" in git, too, which is especially great now that we do so much work inside virtual machines. There seem to be two schools of thought:

Revision 408 Apr 2013 - TobyCabot

Line: 1 to 1
 
META TOPICPARENT name="ProgrammingBookmarks"
http://news.ycombinator.com/item?id=2179123 - excellent intro to version control and git
http://progit.org/book/ - git book (online and available in print)
Line: 15 to 15
  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
Added:
>
>
http://blog.apiaxle.com/post/handy-git-tips-to-stop-you-getting-fired/ - Handy Git tips to stop you getting fired
 

dotfiles

You can store your "dotfiles" in git, too, which is especially great now that we do so much work inside virtual machines. There seem to be two schools of thought:

Revision 325 Apr 2012 - TobyCabot

Line: 1 to 1
 
META TOPICPARENT name="ProgrammingBookmarks"
http://news.ycombinator.com/item?id=2179123 - excellent intro to version control and git
http://progit.org/book/ - git book (online and available in print)
Line: 13 to 13
  if you've got a local branch that's not tracking a remote you can tell it to do so: $ git branch --set-upstream  master barrel/master
Added:
>
>
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
 

dotfiles

You can store your "dotfiles" in git, too, which is especially great now that we do so much work inside virtual machines. There seem to be two schools of thought:

Revision 225 Mar 2011 - TobyCabot

Line: 1 to 1
 
META TOPICPARENT name="ProgrammingBookmarks"
http://news.ycombinator.com/item?id=2179123 - excellent intro to version control and git
http://progit.org/book/ - git book (online and available in print)
Line: 11 to 11
  If you're trying to use a non-default ssh key with git (e.g. for github) then this will help: http://help.github.com/multiple-keys/
Added:
>
>
if you've got a local branch that's not tracking a remote you can tell it to do so: $ git branch --set-upstream  master barrel/master
 

dotfiles

You can store your "dotfiles" in git, too, which is especially great now that we do so much work inside virtual machines. There seem to be two schools of thought:

Revision 116 Mar 2011 - TobyCabot

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="ProgrammingBookmarks"
http://news.ycombinator.com/item?id=2179123 - excellent intro to version control and git
http://progit.org/book/ - git book (online and available in print)
http://www-cs-students.stanford.edu/~blynn/gitmagic/ - the best "gentle introduction" to git that I've found.
http://jointheconversation.org/2008/06/02/railsconf-git-talk/ - excellent introductory screencast. about an hour long, but well worth it
http://macournoyer.wordpress.com/2007/12/27/moron-no-more-i-can-git/ - a nice intro to using git-svn.
http://www.sanityinc.com/articles/partial-emacs-git-svn-mode - some tips for emacs and git-svn
http://www.newartisans.com/blog_files/git.from.bottom.up.php - git from the bottom up
http://www.eqqon.com/index.php/Collaborative_Github_Workflow

If you're trying to use a non-default ssh key with git (e.g. for github) then this will help: http://help.github.com/multiple-keys/

dotfiles

You can store your "dotfiles" in git, too, which is especially great now that we do so much work inside virtual machines. There seem to be two schools of thought:

I'm trying the first approach. It seems less complex.

Setting up a new machine looks like:

$ 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/mitre

http://vcs-home.madduck.net/ - turns out there's a group of people that talk about how they've done this.

Proxy

Some firewalls stomp on the git protocol so if you want to clone using URL's that start with "git:" you'll need to use a proxy to tunnel the git protocol over a different protocol like ssh (assuming the firewall lets ssh through).

Add a few lines to your ~/.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-proxy

Create 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.

View topic | History: r7 < r6 < r5 < r4 | More topic actions...
Copyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding The Caboteria? Send feedback