Just keep typing the following and observe what happens. (This procedure is based on this blog).
Start at any junk directory/folder such as temp.
Start!
$ mkdir gittest
$ cd gittest
$ mkdir example.git
$ cd example.git
$ git init --bare
$ cd ..
$ git clone example.git example1
$ cd example1
$ emacs test.txt (use Notepad on Windows)
Type "hello" in test.txt, and then save and close notepad.
$ git add test.txt
$ git status
$ git commit -a -m "new file added."
$ git status
$ git push origin master
$ cd ..
$ git clone example.git example2
$ cd example2
$ git log
$ emacs test.txt
Type "I am using GIT!" in test.txt, and then save and close notepad.
$ git status
$ git commit -a -m "added another line."
$ git status
$ git push origin master
$ cd ../example1
$ git log
$ git pull
$ git log
Done!
You have just simulated a typical coding cycles using any version control system.
- Created a new repository for the team
- A team member added a new source file (initial implementation)
- Another team member modified the file (bug fix)
- The first team member received the fix made by his buddy.
0 件のコメント:
コメントを投稿