Skip to content

Commit

Permalink
Add note about how to create a dummy binary file.
Browse files Browse the repository at this point in the history
  • Loading branch information
tgamblin committed Mar 9, 2017
1 parent 8e152df commit af6ba38
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion _episodes/09-conflict.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,26 @@ consider one of these approaches to reducing them:
> > ## Solution
> >
> > Let's try it. Suppose Dracula takes a picture of Martian surface and
> > and adds it to the repository:
> > calls it `mars.jpg`.
> >
> > If you do not have an image file of Mars available, you can create
> > a dummy binary file like this:
> >
> > ~~~
> > $ head --bytes 1024 /dev/urandom > mars.jpg
> > $ ls -lh mars.jpg
> > ~~~
> > {: .bash}
> >
> > ~~~
> > -rw-r--r-- 1 vlad 57095 1.0K Mar 8 20:24 mars.jpg
> > ~~~
> > {: .output}
> >
> > `ls` shows us that this created a 1-kilobyte file. It is full of
> > random bytes read from the special file, `/dev/urandom`.
> >
> > Now, suppose Dracula adds `mars.jpg` to his repository:
> >
> > ~~~
> > $ git add mars.jpg
Expand Down

0 comments on commit af6ba38

Please sign in to comment.