I’m using GIT from the command line and trying to commit some changes I’ve made to the repo. I’m new with GIT, so I’m sure I’m missing something pretty simple.
I’ve navigated to the directory where the project resides and am in the directory where the file is located that I want to commit. I’m trying to update the gemfile to include ‘minintest’
I tried:
git commit gemfile -m added minitest to gemfile
error: pathspec ‘gemfile’ did not match any file(s) known to git
Sorry for the novice question. I’m brand new to using git.
Thanks.
You need to
git add gemfileto add the file to the staging section. Then you can commit it usinggit commit(optionally add-m "the commit message"if you do not want git to launch your $EDITOR).Another option would be using
git commit -awhich commits all changed files (as long as they are already tracked) in case you don’t have any changes that you don’t want to commit.