When you decide to use a version control system (VCS) into your project using git And start creating the project
folder and writing the first commands,
Creating the first Repository
$ git init
Now we need to add our file into the Repository
$ git add test_code.js
Now the test_code.js file in the Staging area ( Index )
To get the status of our working tree
$ git status
The last step we need to run
$ git commit
to captures a snapshot of the project's currently staged changes.
$ git commit
Then the default text editor will run you need to write i letter to start typing the commit message and once you have done you need to click on esc button and input :wq to save and quite ,
Here's the problem if you didn’t familiar with the default Vim or nano text editor you need to add this command to use your favourite text editor,
$ git config --global core.editor "Atom"
i'll use Atom as a text editor.finally Run this command
git commit --amend
to recover the commit message by input R then press Enter and run the$ git commit
again
Good Luck and Happy Learning
Top comments (0)