10. git init
~ $ mkdir ilabs
~ $ cd ilabs
wtorek, 11 maja 2010
11. git init
~ $ mkdir ilabs
~ $ cd ilabs
~/ilabs $ git init
Initialized empty Git repository in /Users/teamon/ilabs/.git/
wtorek, 11 maja 2010
12. Nie ma folderow .svn !
git init
~/ilabs $ ls -la
total 0
drwxr-xr-x 3 teamon staff 102 2 maj 15:02 ./
drwxr-xr-x+ 72 teamon staff 2448 2 maj 15:02 ../
drwxr-xr-x 11 teamon staff 374 2 maj 15:05 .git/
wtorek, 11 maja 2010
13. Katalog roboczy
git add
edycja Staging area
git commit
Repozytorium
wtorek, 11 maja 2010
14. git status
~/ilabs $ git status
# On branch master
#
# Initial commit
#
nothing to commit (create/copy files and use "git add" to
track)
wtorek, 11 maja 2010
15. git status
~/ilabs $ echo "KN iLabs" > README
wtorek, 11 maja 2010
16. git status
~/ilabs $ echo "KN iLabs" > README
~/ilabs $ git status
# On branch master
#
# Initial commit
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
#! README
nothing added to commit but untracked files present (use "git add"
to track)
wtorek, 11 maja 2010
41. git stash
~/ilabs $ git stash
Switched to branch 'master'
~/ilabs $ echo "666" >> README
~/ilabs $ git status
# On branch master
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in
working directory)
#
#! modified: README
#
no changes added to commit (use "git add" and/or "git commit -
a")
wtorek, 11 maja 2010
43. git stash
~/ilabs $ cat README
asd
666
~/ilabs $ git stash
Saved working directory and index state WIP on master: 992f518
Merge branch 'foo'
HEAD is now at 992f518 Merge branch 'foo'
wtorek, 11 maja 2010
44. git stash
~/ilabs $ cat README
asd
666
~/ilabs $ git stash
Saved working directory and index state WIP on master: 992f518
Merge branch 'foo'
HEAD is now at 992f518 Merge branch 'foo'
~/ilabs $ git status
# On branch master
nothing to commit (working directory clean)
wtorek, 11 maja 2010
45. git stash
~/ilabs $ cat README
asd
666
~/ilabs $ git stash
Saved working directory and index state WIP on master: 992f518
Merge branch 'foo'
HEAD is now at 992f518 Merge branch 'foo'
~/ilabs $ git status
# On branch master
nothing to commit (working directory clean)
~/ilabs $ cat README
asd
wtorek, 11 maja 2010
46. git stash
~/ilabs $ git stash apply
# On branch master
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in
working directory)
#
#! modified: README
#
no changes added to commit (use "git add" and/or "git commit -
a")
wtorek, 11 maja 2010
47. git stash
~/ilabs $ git stash apply
# On branch master
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in
working directory)
#
#! modified: README
#
no changes added to commit (use "git add" and/or "git commit -
a")
~/ilabs $ cat README
asd
666
wtorek, 11 maja 2010