Permalink
Browse files

Finished and herokurized

  • Loading branch information...
1 parent 579ecb4 commit 6b3a13db1d437629971fa0926b0dd1efb58716c4 @Serabe committed Apr 18, 2010
View
@@ -0,0 +1,4 @@
+bluecloth
+nokogiri
+showoff
+gli
View
@@ -0,0 +1,2 @@
+require "showoff"
+run ShowOff.new
View
@@ -0,0 +1,33 @@
+!SLIDE center transition=toss
+# Tags #
+
+![git-svn-tags](git-svn-tags.png)
+
+!SLIDE bullets incremental
+# Tags #
+
+* It's just a name for a commit.
+* -a for an unsigned tag object.
+* -m for the message
+
+!SLIDE commandline incremental
+# Tagging our repo #
+
+ $ git tag -a -m "Init..." init f90b
+ $ git checkout init
+ HEAD is now at f90b86b... Initial commit
+ $ git checkout master
+ Previous HEAD position was f90b86b... Initial commit
+ $ git tag
+ init
+ $ git show --oneline init
+ tag init
+ Init...
+ f90b86b Initial commit
+
+!SLIDE bullets incremental
+# Pulling and pushing tags #
+
+* Most tags are pulled by default.
+* Use --tags with pull if needed.
+* Use --tags option to push tags.
View
@@ -0,0 +1,42 @@
+!SLIDE commandline incremental
+# Stashing #
+
+ $ echo "A brand new README file" > README.txt
+ $ git status
+ # On branch master
+ # Changed but not updated:
+ # modified: README.txt
+ $ git stash
+ Saved working directory and index state "WIP on master: e4335b4 asno"
+ HEAD is now at e4335b4 asno
+ (To restore them type "git stash apply")
+ $ git stash list
+ stash@{0}: WIP on master: e4335b4 asno
+
+!SLIDE bullets incremental
+# Stashing #
+
+* Use stash to save changes without committing.
+* Use stash list to show the _stashes_
+
+!SLIDE commandline incremental
+# Stashing #
+
+ $ echo 'def hello;"hello";end;puts hello' > script.rb
+ $ ruby script.rb
+ hello
+ $ git commit -a -m "Modified script."
+ [master 7e42ebb] Modified script.
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+ $ cat README.txt
+ bye, bye beautiful
+ $ git stash apply
+ # On branch master
+ # Changed but not updated:
+ #
+ # modified: README.txt
+ $ cat README.txt
+ A brand new README file
+ $ git commit -a -m "Brand new Readme"
+ [master 74acb46] Brand new Readme
+ 1 files changed, 1 insertions(+), 1 deletions(-)
@@ -0,0 +1,17 @@
+!SLIDE bullets incremental
+# Last but not least #
+
+* You can sign any object
+* There are many more tools
+* git help is your friend
+* Gitorious
+* Gitosis
+
+!SLIDE
+
+# Questions? #
+
+!SLIDE
+
+# Thank you #
+
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -1,4 +1,6 @@
[
{"section":"one"},
- {"section":"two"}
+ {"section":"two"},
+ {"section":"three"},
+ {"section":"four"}
]
View
@@ -0,0 +1,71 @@
+!SLIDE bullets incremental center transition=scrollRight
+# Branches in SVN #
+
+![git-svn-branches](git-svn-branches.png)
+
+!SLIDE commandline incremental
+# Branches in git #
+
+ $ git branch
+ * master
+
+ $ git checkout -b show_me_the_money
+ Switched to a new branch 'show_me_the_money'
+
+ $ git branch
+ master
+ * show_me_the_money
+
+ $ git checkout master
+ Switched to branch 'master'
+
+ $ git branch
+ * master
+ show_me_the_money
+
+!SLIDE bullets incremental
+# More about branches #
+
+* Default branch: master (convention)
+* -d: delete branch, if fully merged in HEAD.
+* -D: delete branch.
+* -r: list remote branches.
+
+!SLIDE commandline incremental
+# Working a bit with branches #
+
+ $ echo 'echo "the money"' > show_me
+ $ chmod a+x show_me
+ $ ./show_me
+ the money
+ $ git add show_me
+ $ git commit -m "Show me the money"
+ [show_me_the_money bcc25ff] Show me the money
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+ create mode 100755 show_me
+ $ git diff --shortstat master show_me_the_money
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+!SLIDE commandline incremental
+# Simple merging #
+
+ $ git checkout master
+ Switched to branch 'master'
+
+ $ git merge show_me_the_money
+ Updating f78d882..bcc25ff
+ Fast forward
+ show_me | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+ create mode 100755 show_me
+
+ $ git branch -d show_me_the_money
+ Deleted branch show_me_the_money (was bcc25ff).
+
+!SLIDE bullets incremental
+# What about conflicts? #
+
+* <<<<<<< _starts_ the conflict
+* ======= _separates_ different versions
+* &gt;&gt;&gt;&gt;&gt;&gt;&gt; _ends_ the conflict
+* _git reset --hard HEAD_ if too many conflicts
View
@@ -0,0 +1,61 @@
+!SLIDE bullets incremental transition=scrollRight
+# Remote #
+* It is where the distributed part comes in.
+* git remot add &lt;alias&gt; &lt;URL&gt;
+* You can add several remotes.
+
+!SLIDE bullets incremental
+# Pull #
+* Fetch and merge changes in a remote.
+* git pull &lt;repository&gt; &lt;refspec&gt;
+* git pull &lt;remote&gt; &lt;branch&gt;
+
+!SLIDE bullets incremental
+# Push #
+* Push the changes to another repo.
+* _git push &lt;repository&gt; &lt;refspec&gt;_
+* By default, pushes the branches in common with repository.
+* _git push &lt;remote&gt; &lt;branch&gt;_
+
+!SLIDE commandline incremental
+ $ cd ..
+ $ git clone new_repo new_remote
+ $ cd new_repo
+ $ git remote add my_remote file:///home/sergio/tmp/new_remote
+ $ git pull my_remote master
+ From file:///home/sergio/tmp/new_remote
+ * branch master -> FETCH_HEAD
+ Already up-to-date.
+ $ echo "More info" >> README.txt
+ $ git commit -a "More info"
+ [master cee4433] More info
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+ $ cd ../new_remote
+
+!SLIDE commandline incremental transition=scrollUp
+
+ $ echo "ASNO (Another Stupid Number Ordering)" > asno
+ $ git add asno
+ $ git commit -m "asno"
+ [master e4335b4] asno
+ 2 files changed, 1 insertions(+), 1 deletions(-)
+ create mode 100644 asno
+ $ cd ../new_repo
+ $ git pull my_remote master
+ remote: Counting objects: 6, done.
+ remote: Compressing objects: 100% (2/2), done.
+ remote: Total 4 (delta 0), reused 1 (delta 0)
+ Unpacking objects: 100% (4/4), done.
+ From file:///home/sergio/tmp/new_remote
+ * branch master -> FETCH_HEAD
+ Updating cee4433..e4335b4
+ Fast forward
+ README.txt | 1 -
+ asno | 1 +
+ 2 files changed, 1 insertions(+), 1 deletions(-)
+ create mode 100644 asno
+
+!SLIDE bullets incremental
+# Do not forget...#
+* Only push if there is no other option.
+* Be kind, ask for a pull request.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -9,6 +9,12 @@
$ git config --global user.name "Serabe"
$ git config --global user.email "serabe@gmail.com"
+!SLIDE bullets incremental
+
+* Global config file in _~/.gitconfig_
+* Project config file in _.git/config_
+
+
!SLIDE commandline incremental
# Create a new repo #
View
@@ -30,3 +30,6 @@
# What's next? #
* Committing
+* Log
+* Diff
+* Branching
View
@@ -0,0 +1,17 @@
+!SLIDE commandline incremental
+# Brief Break: Cloning #
+
+ $ git clone git://github.com/jruby/jruby [<directory>]
+ Initialized empty repository in jruby/.git
+ remote: Counting objects: 129980, done.
+ remote: Compressing objects: 100% (33277/33277), done.
+ Receiving objects: 100% (129890/129890), 54.94 MiB, done.
+ Resolving deltas: 100% (90425/90425), done.
+ $ ls
+ jruby
+
+!SLIDE bullets incremental
+# Brief Break: To add or not to add #
+* Source code
+* Build scripts
+* Binaries needed (only if really needed).
View
@@ -0,0 +1,13 @@
+!SLIDE commandline incremental
+# Committing #
+
+ $ git commit -m "Initial commit"
+ [master (root-commit) f90b86b] Initial commit
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+ create mode 100644 README.txt
+
+!SLIDE bullets incremental
+# Options #
+
+* -a: commit all changes to tracked files.
+* -m: followed by commit message.
View
@@ -0,0 +1,47 @@
+!SLIDE commandline incremental
+# A few more changes #
+
+ $ echo bye, bye beautiful > README.txt
+ $ cat README.txt
+ bye, bye beautiful
+ $ git commit -a -m "I need another commit"
+ [mater e1b7b89] I need another commit
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+!SLIDE commandline incremental
+# Log: example #
+ $ git log
+ commit e1b7b899d2b5f672c3139aabc67b6a0e8a4032dc
+ Author: Sergio Arbeo <serabe@gmail.com>
+ Date: Sun Apr 18 17:22:09 2010 +0200
+
+ I need another commit
+
+ commit f90b86beb4b99e88bf02ba3f6a7377d84617cf57
+ Author: Sergio Arbeo <serabe@gmail.com>
+ Date: Sun Apr 18 17:11:49 2010 +0200
+
+ Initial commit
+
+!SLIDE bullets incremental
+# Log: info showed #
+* SHA1
+* Author
+* Date
+* Full commit message
+
+!SLIDE bullets incremental
+# Log: options #
+* --pretty [oneline|short|medium|full|fuller|email|raw]
+* -n N: number of commits to show.
+* --since="1 year ago"
+* --until=today
+
+!SLIDE commandline incremental
+# Log example #
+ $ git log -n 7 --oneline --since="2 days ago"
+ 940ef1a Do not go through RubyString in Kernel#...
+ 245fe4e In 1.9, Kernel#global_variables, Kernel#...
+ a531f14 Fix jruby.jit.maxsize help text.
+ 8c9d4ce Use gemcutter when releasing, and...
+ 61c620a Fix JRUBY-4715 FFI::StructByValue...
View
@@ -0,0 +1,43 @@
+!SLIDE bullets incremental
+# Diff #
+
+* By default, shows changes between working tree and index.
+* --numstat, --stat, --shortstat
+
+!SLIDE commandline incremental
+
+# More cowbell #
+
+ $ echo 'def hello;"hello, world";end;puts hello' > script.rb
+ $ ruby script.rb
+ hello, world
+ $ git add script.rb
+ $ git commit -m "Added script"
+ [master f78d882] Added script
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+ create mode 100644 script.rb
+
+!SLIDE commandline incremental
+
+# Diff #
+
+ $ git diff --numstat f90b..f78d
+ 1 1 README.txt
+ 1 0 script.rb
+
+ $ git diff --stat f90b..f78d
+ README.txt | 2 +-
+ script.rb | 1 +
+ 2 files changed, 2 insertions(+), 1 deletions(-)
+
+ $ git diff --shortstat f90b..f78d
+ 2 files changed, 2 insertions(+), 1 deletions(-)
+
+!SLIDE commandline incremental
+# Where did f90b..f78d come from? #
+
+ $ git log --pretty=oneline
+ f78d882af69ac823fe94411e97a8de91162a9380 Added script
+ e1b7b899d2b5f672c3139aabc67b6a0e8a4032dc I need another commit
+ f90b86beb4b99e88bf02ba3f6a7377d84617cf57 Initial commit
+
@@ -0,0 +1,5 @@
+!SLIDE bullets incremental
+# Other basic commands #
+
+* mv
+* rm

0 comments on commit 6b3a13d

Please sign in to comment.