Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jun 2nd, 2012  |  syntax: None  |  size: 1.82 KB  |  views: 28  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. F:\>mkdir gittest
  2. F:\>cd gittest
  3. F:\gittest>mkdir repo1
  4. F:\gittest>cd repo1
  5. F:\gittest\repo1>touch test1
  6. F:\gittest\repo1>touch test2
  7. F:\gittest\repo1>git init
  8. Initialized empty Git repository in F:/gittest/repo1/.git/
  9.  
  10. F:\gittest\repo1>git add .
  11. F:\gittest\repo1>git commit -m "init"
  12. [master (root-commit) 8211839] init
  13.  0 files changed, 0 insertions(+), 0 deletions(-)
  14.  create mode 100644 test1
  15.  create mode 100644 test2
  16.  
  17. F:\gittest\repo1>cd ..
  18. F:\gittest>git clone repo1 repo2
  19. Cloning into repo2...
  20. done.
  21.  
  22. F:\gittest>cd repo2
  23. F:\gittest\repo2>ls
  24. test1  test2
  25.  
  26. F:\gittest\repo2>cd ..
  27. F:\gittest>cd repo1
  28. F:\gittest\repo1>git rm --cached test1
  29. rm 'test1'
  30.  
  31. F:\gittest\repo1>ls
  32. test1  test2
  33.  
  34. F:\gittest\repo1>git status
  35. # On branch master
  36. # Changes to be committed:
  37. #   (use "git reset HEAD <file>..." to unstage)
  38. #
  39. #       deleted:    test1
  40. #
  41. # Untracked files:
  42. #   (use "git add <file>..." to include in what will be committed)
  43. #
  44. #       test1
  45.  
  46. F:\gittest\repo1>git commit -m "rm"
  47. [master 7bec153] rm
  48.  0 files changed, 0 insertions(+), 0 deletions(-)
  49.  delete mode 100644 test1
  50.  
  51. F:\gittest\repo1>git status
  52. # On branch master
  53. # Untracked files:
  54. #   (use "git add <file>..." to include in what will be committed)
  55. #
  56. #       test1
  57. nothing added to commit but untracked files present (use "git add" to track)
  58.  
  59. F:\gittest\repo1>cd ..
  60.  
  61. F:\gittest>cd repo2
  62.  
  63. F:\gittest\repo2>ls
  64. test1  test2
  65.  
  66. F:\gittest\repo2>git pull
  67. remote: Counting objects: 3, done.
  68. remote: Compressing objects: 100% (1/1), done.
  69. remote: Total 2 (delta 0), reused 0 (delta 0)
  70. Unpacking objects: 100% (2/2), done.
  71. From F:/gittest/repo1
  72.    8211839..7bec153  master     -> origin/master
  73. Updating 8211839..7bec153
  74. Fast-forward
  75.  0 files changed, 0 insertions(+), 0 deletions(-)
  76.  delete mode 100644 test1
  77.  
  78. F:\gittest\repo2>ls
  79. test2