Matthew McCullough and Tim Berglund, authors of the O'Reilly Git Master Class videos will introduce you to the very edges of Git's capabilities. There are plenty of "Getting Started with Git" sessions on the web, but we'd like to take 40 minutes of your time in an entirely different direction. These 40 minutes will primarily be live coding with a few diagrams for reference. We'll show you how Git reaches farther than any other version control system to provide capabilities for both the novice and the master craftsperson.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <project> | |
| <modelVersion>4.0.0</modelVersion> | |
| <groupId>com.example</groupId> | |
| <artifactId>shitty</artifactId> | |
| <packaging>jar</packaging> | |
| <version>1.0-SNAPSHOT</version> | |
| <dependencies> | |
| <dependency> | |
| <groupId>junit</groupId> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #Uses the brew or macports binaries of 'markdown'. Needs the 'markdown' executable on the $PATH. | |
| INPUTFILE="$1" | |
| OUTPUTFILE=`echo "$INPUTFILE" | sed "s/\.md/\.html/"` | |
| echo Writing markdown file to \"$OUTPUTFILE\" | |
| markdown.pl "$INPUTFILE" > "$OUTPUTFILE" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ############################################################################## | |
| # History Configuration | |
| ############################################################################## | |
| HISTSIZE=5000 #How many lines of history to keep in memory | |
| HISTFILE=~/.zsh_history #Where to save history to disk | |
| SAVEHIST=5000 #Number of history entries to save to disk | |
| #HISTDUP=erase #Erase duplicates in the history file | |
| setopt appendhistory #Append history to the history file (no overwriting) | |
| setopt sharehistory #Share history across terminals | |
| setopt incappendhistory #Immediately append to the history file, not just when a term is killed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Using Git? Want to ignore changes to a noisy (e.g. tool-updated file), yet have to have it exist to satisfy said tool? | |
| # Check it in once to source code control, then ignore all future changes. This option only applies to your local clone. | |
| # Use this by typing 'git ignorechanges MYFILE' | |
| git config --global alias.ignorechanges = update-index --assume-unchanged | |
| # Use this by typing 'git noticechanges MYFILE' | |
| git config --global alias.noticechanges = update-index --no-assume-unchanged | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git init testrecursiveignore | |
| cd testrecursiveignore | |
| mkdir target | |
| echo buildjunk > target/build1.log | |
| mkdir -p subproject/target | |
| echo buildjunk > subproject/target/build2.log | |
| echo //HelloWorld >> code/mycode.java |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'rake' | |
| HOME = "#{File.dirname(__FILE__)}" | |
| DEST = "#{HOME}/output" | |
| task :default => [:genoutputfolders] | |
| task :genoutputfolders do | |
| directory "output" | |
| directory "#{DEST}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % git status --branch | |
| # On branch master | |
| # Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded. | |
| # | |
| nothing to commit (working directory clean) | |
| % git branch -v | |
| * master a60b37e [behind 1] First checkin | |
| mynewfeature 7a910dc Checking in everything |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Put this in your .gitconfig file under the alias section | |
| orphank = !gitk --all `git reflog | cut -c1-7`& | |
| # Then run it by typing 'git orphank' on the command line. | |
| # A text version of the same is | |
| orphanl = !git --pretty=oneline --abbrev-commit --graph --decorate `git reflog | cut -c1-7` |