![]() We forgot to include the other files from our project download, so let's include those files in a folder and make the commit: To get us there, we're going to do a little cleanup on our project repo. No matter, like a time machine, Git allows you to move the pointer on your repo to any commit, and it will likewise change the repo files and structure to reflect that. Clicking Yes enters the new commit to your repo:Įxercises-Coming soon! Resetting (Checking Out Previous) Commits, and Stash/PopĪt times, there may be the need to go back in history to a previous commit: perhaps you wish to retrieve files that you've deleted or changed, or perhaps you wish to inspect the state of your project and code to inform current work. When prompted, you can immediate commit this explicit change, or keep the changes as a WIP (work in progress) for you to do additional work. ![]() From there, select the Revert Commit option: To perform this, click on the commit node, and right-mouse click to see the popup menu. This will not only bring back the changes to your working directory, but will include an explicit commit to document that this change to the repo. If the Undo option is not available or not appropriate, one can use the Revert Commit option for the latest commit or even a previous one. Hover over the Undo button to see what action it will take, and click if that seems appropriate: commit, branch, etc) you didn't mean to make? GitKraken's Undo button in the top toolbar will let you undo most actions (which can also Redo if needed!). Sometimes you just want to undo the last thing you did. If you wish to amend the message only, hover over and click on the commit message in the bottom pane for the latest commit:Ĭhange your commit message, and click on the Update Message button at the bottom: And the Commit button is titled Amend Previous Commit instead. You'll note that the previous commit message is copied into the Message and Description fields. Stage the files would wish to include in the updated commit, and selected the Amend checkbox in the Commit Message pane: To make changes / add files, click on the //WIP node on the graph: Oops! Pushed 'Commit' button too fast? As long as you have not updated any remotes, you can amend the last commit message, add additional changes, or both. This section with help you navigate these items. Sometimes a simple commit isn't that simple: you've forgotten something, you need to undo what you've done, or you need to go back to something you committed some time ago. Learn how to temporarily hide work in progress.Learn how to work with a previous commit.Previous: Remote repositories, managing conflicts Bob Freeman, Radhika Khetani, Amir Karger
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |