¿Cómo comprometer un file Git localmente?

Quiero enviar un file localmente a un repository de Git para mis proyectos de muestra

Intentos fallidos para confirmar el file localmente

Divyanshu (master +) asteroids $ git commit -m "Fire one bullet at a time" fatal: cannot lock ref 'HEAD': Unable to create 'C:/Users/Divyanshu/Desktop/dktop/focus/ Udacity/Git-hub/version-control/repositories/asteroids/.git/refs/heads/master.lock': File exists. Another git process seems to be running in this repository, eg an editor opened by 'git commit'. Please make sure all processes are terminated then try again. If it still fails, a git process may have crashed in this repository earlier: remove the file manually to continue. 

Sigue estos pasos:

  • Cierre todo el terminal de Git o cualquier otro editor que esté accediendo a los files de ese repository

  • Vaya a esta ruta: C:/Users/Divyanshu/Desktop/dktop/focus/Udacity/Git-hub/version-control/repositories/asteroids/.git/refs/heads/master.lock

  • Eliminar el file llamado master.lock

  • Ejecuta tu terminal Git nuevamente en modo administrador

¡Entonces deberías intentar volver a comprometerte!