课程: Git from Scratch

今天就学习课程吧!

今天就开通帐号,24,700 门业界名师课程任您挑!

git commit: Commit changes to memory

git commit: Commit changes to memory - Git教程

课程: Git from Scratch

git commit: Commit changes to memory

- [Speaker] The power of Git becomes apparent when you start committing changes to the history of the project. This is done using the git commit command. When you run git commit, you tell Git, add the changes in the staging area to the history of this project so they can be referenced or recalled later. You also add a commit message using -m to explain what changes were made. So when you look back on the project history, you can see that, all right, this is where I added that new feature. Git commit creates a snapshot, a picture of the current state of your project at this particular moment in time, and adds it to the branch you're currently working on. As you work on your project and commit more snapshots, the branch grows and forms a timeline of events. This means you can now look back on any commit in the branch and see what your code looked like at that time. And you can compare any stage of your code with any other…

内容