Advanced Node.js Development
上QQ阅读APP看书,第一时间看更新

Making commit for the deleting documents methods

Before we go, let's go ahead and make a commit, pushing it up to GitHub. In the Terminal, I can shut down the script and I can run git status to see what files we have untracked. Here, we have our mongodb-delete file. I can add it using git add . and then I can commit, using git commit with the -m flag. Here, I can go ahead and provide a commit message, which is going to be Add delete script:

git commit -m 'Add delete script'

I'm going to make that commit and I am going to push it up to GitHub using git push, which will default to the origin remote. When you only have one remote, the first one is going to be called origin. This is the default name, just like master is the default branch. With this in place, we are now done. Our code is up on GitHub. The topic of the next section is updating, which is where you're going to learn how to update documents inside of a collection.