Ver Mensaje Individual
  #4 (permalink)  
Antiguo 28/02/2013, 16:10
Avatar de pateketrueke
pateketrueke
Modernizr
 
Fecha de Ingreso: abril-2008
Ubicación: Mexihco-Tenochtitlan
Mensajes: 26.399
Antigüedad: 16 años
Puntos: 2534
Respuesta: Como eliminar archivo temporal en GIT?

Debe funcionar, después de eliminar de cache debes hacer commit de ello también.

Aquí el problema que puedes estar teniendo es que el nombre del archivo contiene caracteres especiales y eso arruina las instrucciones.

Pensaba que al estar usando Windows ese no sería un problema, pero veo que si.

Hice la prueba y aquí está el log.
Código BASH:
Ver original
  1. [~]$ cd Sites/
  2. [Sites]$ mkdir fuu
  3. [Sites]$ cd fuu/
  4. [fuu]$ git init
  5.  
  6. Initialized empty Git repository in fuu/.git/
  7.  
  8. [fuu (master)]$ touch candy.txt
  9. [fuu (master)]$ touch \~\$candy.txt
  10. [fuu (master)]$ git s
  11.  
  12. # On branch master
  13. #
  14. # Initial commit
  15. #
  16. # Untracked files:
  17. #   (use "git add <file>..." to include in what will be committed)
  18. #
  19. #   candy.txt
  20. #   ~$candy.txt
  21. nothing added to commit but untracked files present (use "git add" to track)
  22.  
  23. [fuu (master)]$ git add .
  24. [fuu (master)]$ git s
  25.  
  26. # On branch master
  27. #
  28. # Initial commit
  29. #
  30. # Changes to be committed:
  31. #   (use "git rm --cached <file>..." to unstage)
  32. #
  33. #   new file:   candy.txt
  34. #   new file:   ~$candy.txt
  35. #
  36.  
  37. [fuu (master)]$ git ci -m "bar"
  38. [master (root-commit) 28d50e2] bar
  39.  
  40.  0 files changed
  41.  create mode 100644 candy.txt
  42.  create mode 100644 ~$candy.txt
  43.  
  44. [fuu (master)]$ git s
  45.  
  46. # On branch master
  47. nothing to commit, working directory clean
  48.  
  49. [fuu (master)]$ rm \~\$candy.txt
  50. [fuu (master)]$ git s
  51.  
  52. # On branch master
  53. # Changes not staged for commit:
  54. #   (use "git add/rm <file>..." to update what will be committed)
  55. #   (use "git checkout -- <file>..." to discard changes in working directory)
  56. #
  57. #   deleted:    ~$candy.txt
  58. #
  59. no changes added to commit (use "git add" and/or "git commit -a")
  60.  
  61. [fuu (master)]$ git rm --cached \~\$candy.txt
  62.  
  63. rm '~$candy.txt'
  64.  
  65. [fuu (master)]$ git s
  66.  
  67. # On branch master
  68. # Changes to be committed:
  69. #   (use "git reset HEAD <file>..." to unstage)
  70. #
  71. #   deleted:    ~$candy.txt
  72. #
  73.  
  74. [fuu (master)]$ git ci -m "candy"
  75. [master a3d0308] candy
  76.  
  77.  0 files changed
  78.  delete mode 100644 ~$candy.txt
  79.  
  80. [fuu (master)]$ git s
  81.  
  82. # On branch master
  83. nothing to commit, working directory clean
  84.  
  85. [fuu (master)]$ ls -a
  86.  
  87. .       ..      .git        candy.txt
__________________
Y U NO RTFM? щ(ºдºщ)

No atiendo por MP nada que no sea personal.