How to saves all the staged changes to the local repository using 'git commit'

AuthorHariom Prajapati

Pubish Date07 Aug 2022

categoryGit

In this tutorial we will see how to commit a added file or folder to the Git staging area using gIt commit.

Commits are an important part of the Git version control system. we can use it after adds a file or folder to a git staging area using git add.

Using git commit, we can save all the staged changes to our local repositry with a custom comment or without comment.

➡️ Git commit -a : It is use to commit all added file or folder without custom message.

➡️ git commit -m : It is use to commit all added files with custom message.

 

1) Commit all folder or file without comment using below command line

git commit -a

Git commit

 

2) Commit all folder or file with comment using below command line

git commit -m 'your message here'

git commit

Comments 0

Leave a comment