by Adam
What is Bitcoin?
I aim to empower you,
challenge you, and
inspire you to learn more.
You know version control, but this is...
Distributing a version control system is a pain in the butt. Why bother?
But first, a gentle introduction to Git.
In those slides, which operations were local?
Command line
$ echo Hello, World
Saved file
#!/bin/bash
echo Hello, World
Starring... foo.sh
!
$ cd /tmp # change dir to /tmp
$ pwd # display current dir
$ ls -l # detailed listing of files in current dir
$ touch foo.sh # create empty file 'foo.sh'
$ vim foo.sh # edit foo.sh with Vim text editor
$ file foo.sh # identify foo.sh based on contents
$ cat foo.sh # display contents of foo.sh
$ chmod +x foo.sh # make foo.sh executable
$ chown zed foo.sh # make user 'zed' the owner of foo.sh
$ ./foo.sh # execute foo.sh in current dir
$ rm foo.sh # delete file foo.sh in current dir
$ history # list recent commands
$ top # display Linux tasks
$ yum install emacs # install emacs operating system
$ at 5pm # run a command at 5pm
$ ss -ln # display listening ports
$ ifconfig # display network interfaces
$ date +%s # display seconds since the epoch
$ date -d @398352385 # convert same back to date/time string
$ curl http://icanhazip.com # display public IP address
$ ping google.com # ping google.com
$ help history # help for 'history' Bash builtin
$ ls --help | less # show usage info for 'ls', paged with 'less'
$ man nano # open the 'nano' manpage
$ git blarf # illegal, prints helpful message
What's the best way to get help?
Let's get deeper into Git.
$ ls --help | less # you should know this one by now
$ rpm -qa | grep magick # list installed packages with 'magick' in their name
$ echo Hello, World > clobbered-by-stdout.txt
$ echo Hello, World >> appended.txt
$ find /tmp 2> stderr.txt
$ sed -e 's/take/give/' < in.txt > out.txt
$ jobs # list currently running jobs
$ bg # resume a job suspended with CTRL-z, in the background
$ fg # same, in the foreground
for repo in `\ls`
do
echo $repo
done | xargs -n1 -I{} git --git-dir={}/.git pull --ff-only
But ugh, so slow! Let's pile up blocking operations.
for repo in `\ls`
do
echo $repo
done | xargs -P8 -n1 -I{} git --git-dir={}/.git pull --ff-only
bash(1)
manpage or the reference manual#git
on FreeNode), mailing lists