F:\>mkdir gittest
F:\>cd gittest
F:\gittest>mkdir repo1
F:\gittest>cd repo1
F:\gittest\repo1>touch test1
F:\gittest\repo1>touch test2
F:\gittest\repo1>git init
Initialized empty Git repository in F:/gittest/repo1/.git/
F:\gittest\repo1>git add .
F:\gittest\repo1>git commit -m "init"
[master (root-commit) 8211839] init
0 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 test1
create mode 100644 test2
F:\gittest\repo1>cd ..
F:\gittest>git clone repo1 repo2
Cloning into repo2...
done.
F:\gittest>cd repo2
F:\gittest\repo2>ls
test1 test2
F:\gittest\repo2>cd ..
F:\gittest>cd repo1
F:\gittest\repo1>git rm --cached test1
rm 'test1'
F:\gittest\repo1>ls
test1 test2
F:\gittest\repo1>git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# deleted: test1
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# test1
F:\gittest\repo1>git commit -m "rm"
[master 7bec153] rm
0 files changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 test1
F:\gittest\repo1>git status
# On branch master
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# test1
nothing added to commit but untracked files present (use "git add" to track)
F:\gittest\repo1>cd ..
F:\gittest>cd repo2
F:\gittest\repo2>ls
test1 test2
F:\gittest\repo2>git pull
remote: Counting objects: 3, done.
remote: Compressing objects: 100% (1/1), done.
remote: Total 2 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (2/2), done.
From F:/gittest/repo1
8211839..7bec153 master -> origin/master
Updating 8211839..7bec153
Fast-forward
0 files changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 test1
F:\gittest\repo2>ls
test2