代码
kamil@ubuntu:~/github/xzdz$ git init
Initialized empty Git repository in /home/kamil/github/xzdz/.git/
kamil@ubuntu:~/github/xzdz$ ls -a
. .. a.py .git
kamil@ubuntu:~/github/xzdz$ ls .git/
branches config description HEAD hooks info objects refs
kamil@ubuntu:~/github/xzdz$ git clone https://github.com/gleitz/howdoi.git
Cloning into 'howdoi'...
remote: Counting objects: , done.
remote: Total (delta ), reused (delta ), pack-reused
Receiving objects: % (/), 120.42 KiB | 67.00 KiB/s, done.
Resolving deltas: % (/), done.
Checking connectivity... done.
kamil@ubuntu:~/github/xzdz$
2
kamil@ubuntu:~/github/cs1$ git add b.py
fatal: Not a git repository (or any of the parent directories): .git
kamil@ubuntu:~/github/cs1$
kamil@ubuntu:~/github/cs1$ git init
Initialized empty Git repository in /home/kamil/github/cs1/.git/
kamil@ubuntu:~/github/cs1$ git status
On branch master Initial commit Untracked files:
(use "git add <file>..." to include in what will be committed) b.py nothing added to commit but untracked files present (use "git add" to track)
kamil@ubuntu:~/github/cs1$ git add b.py
kamil@ubuntu:~/github/cs1$ git status
On branch master Initial commit Changes to be committed:
(use "git rm --cached <file>..." to unstage) new file: b.py kamil@ubuntu:~/github/cs1$