Main

W 1 D1session

~/work 9:32> mkdir topdir
~/work 9:33> ls 
topdir/
~/work 9:33> cd topdir
topdir 9:34> ls
topdir 9:34> git init --bare myrepo
Initialized empty Git repository in /Users/norris/work/topdir/myrepo/
topdir 9:35> ls myrepo
HEAD         config       hooks/       objects/
branches/    description  info/        refs/
topdir 9:35> pwd
/Users/norris/work/topdir
topdir 9:38> git clone myrepo myrepo1
Cloning into 'myrepo1'...
warning: You appear to have cloned an empty repository.
done.
Checking connectivity... done
topdir 9:39> cd myrepo1
myrepo1 9:40> ls
myrepo1 9:40> ls -a
./    ../   .git/
myrepo1 9:40> vi test.txt
myrepo1 9:41> ls
test.txt
myrepo1 9:41> git add test.txt
myrepo1 9:41> git commit test.txt
[master (root-commit) 4dcfbaf] Added a test.
 1 file changed, 1 insertion(+)
 create mode 100644 test.txt
myrepo1 9:44> git push
Counting objects: 3, done.
Writing objects: 100% (3/3), 229 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To /Users/norris/work/topdir/myrepo
 * [new branch]      master -> master
myrepo1 9:44> cd ..
topdir 9:45> ls
myrepo/  myrepo1/
topdir 9:45> git clone myrepo myrepo2
Cloning into 'myrepo2'...
done.
Checking connectivity... done
topdir 9:46> ls
myrepo/  myrepo1/ myrepo2/
topdir 9:46> cd myrepo2
myrepo2 9:46> ls
test.txt
myrepo2 9:46> vi test.txt 
myrepo2 9:46> git status
# On branch master
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#	modified:   test.txt
#
no changes added to commit (use "git add" and/or "git commit -a")
myrepo2 9:46> git commit -m "added response" test.txt 
[master 4061bab] added response
 1 file changed, 1 insertion(+)
myrepo2 9:47> git push
Counting objects: 5, done.
Writing objects: 100% (3/3), 281 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To /Users/norris/work/topdir/myrepo
   4dcfbaf..4061bab  master -> master
myrepo2 9:47> cd ..
topdir 9:47> ls
myrepo/  myrepo1/ myrepo2/
topdir 9:47> cd my
myrepo/  myrepo1/ myrepo2/ 
topdir 9:47> cd myrepo1
myrepo1 9:47> ls
test.txt
myrepo1 9:47> cat test.txt 
Hi, I'm new!
myrepo1 9:48> git pull
remote: Counting objects: 5, done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From /Users/norris/work/topdir/myrepo
   4dcfbaf..4061bab  master     -> origin/master
Updating 4dcfbaf..4061bab
Fast-forward
 test.txt | 1 +
 1 file changed, 1 insertion(+)
myrepo1 9:48> cat test.txt 
Hi, I'm new!
Hi, nice to meet you!
myrepo1 9:48> 

Green Marinee theme adapted by David Gilbert, powered by PmWiki