2. Table of contents
Version control
Distributed revision control
Repository
Adding, commiting
Tracking changes
Branches
Pushing, pulling
Submodules
Ranges and other identifications of hashes
Other fun stuff
Resources
22. Let’s put some code in!
$ echo "some code" > index.php
$ git add index.php
23. Let’s put some code in!
$ echo "some code" > index.php
$ git add index.php
Oh shit, it is only added to the “index“!
24. Let’s put some code in!
$ echo "some code" > index.php
$ git add index.php
Oh shit, it is only added to the “index“!
Well, fuck that!
$ git commit -m "My first commit"
25. Let’s put some code in!
$ echo "some code" > index.php
$ git add index.php
Oh shit, it is only added to the “index“!
Well, fuck that!
$ git commit -m "My first commit"
But it is not on the remote server yet!
$ git push ...
26. Nobody is looking, let’s commit
everything!
$ cat > index.php
<?php
Thousand lines of code
...
ˆD
$ git commit -a
27. What the hell did I do?
(in the working tree)
$ git diff