top of page
Beginner
Q6: How do you commit changes in Git?
To commit changes in Git, you need to follow these steps:
1. Use the command `git add <filename>` to stage the changes you want to include in the commit.
2. Use the command `git commit -m "Commit message"` to create a new commit with the staged changes. The commit message should provide a brief description of the changes.
bottom of page