Changes between Version 14 and Version 15 of versionControl/git
- Timestamp:
- Jan 18, 2017 10:58:52 AM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
versionControl/git
v14 v15 247 247 }}} 248 248 249 In Git, the commit you are currently working on is known as the `HEAD` commit. In many cases, the `HEAD` commit is the most recent in time. To see the `HEAD` commit:250 251 {{{252 git show HEAD253 }}}254 255 256 257 249 Add changes to the last commit 258 250 {{{ … … 284 276 Commit a snapshot of all changes in the working directory. This only includes modifications to tracked files (those that have been added with git add at some point in their history). 285 277 278 In Git, the commit you are currently working on is known as the `HEAD` commit. In many cases, the `HEAD` commit is the most recent in time. To see the `HEAD` commit: 279 280 {{{ 281 git show HEAD 282 }}} 283 284 285 286 286 === Revert commit === 287 287 The {{{git revert}}} command undoes a committed snapshot. But, instead of removing the commit from the project history, it figures out how to undo the changes introduced by the commit and appends a new commit with the resulting content. This prevents Git from losing history, which is important for the integrity of your revision history and for reliable collaboration.