Computer Science, asked by Dhidhi4187, 1 year ago

What is the GIT command to skip staging and directly commit the changes directly ?

Answers

Answered by jefferson7
2

Staging in git allows a user to make changes to the working directory. When the user wants to interact with the version control, it allows them to record the changes as small commits.

A commit refers to the act of making tentative changes immutable.

For example, if a user has edited 3 files (1.html, 2.html and 3.html). Afterwards that the user needs to commit all the changes in order to ensure that the changes to 1.html and 2.html are in a single commit, while the changes to 3.html aren't logically associated with the first two files and are completed in a separate commit.

The command for doing this is the git add

git add 1.html

git add 2.html

git commit -m "Changes for 1 and 2"

git add 3.html

git commit -m "Unrelated change to 3"

Answered by areebamashaal
0
  1. by using the --interactive commit command ;one can directly input the changes without performing any other operations.The command for this is the git add

git commit -m "Changes for 1 and 2"

through this comand one can easily do changeswithout going back again and again.

hope so this will you..

Similar questions