From 616c8777d6d259a8a67768d7adf6b99e59be0a13 Mon Sep 17 00:00:00 2001 From: Marium Firdous Kazmi Date: Wed, 8 Aug 2018 09:20:31 +0530 Subject: [PATCH] spelling mistake corrected --- .../moving-a-commit-to-a-different-branch.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/additional-material/git_workflow_scenarios/moving-a-commit-to-a-different-branch.md b/additional-material/git_workflow_scenarios/moving-a-commit-to-a-different-branch.md index 45227460042..72eeea01bb6 100644 --- a/additional-material/git_workflow_scenarios/moving-a-commit-to-a-different-branch.md +++ b/additional-material/git_workflow_scenarios/moving-a-commit-to-a-different-branch.md @@ -1,5 +1,5 @@ # Moving a commit to a different branch -What if you commit a change, and then realize that you commited to a different branch? +What if you commit a change, and then realize that you committed to a different branch? How can you change that? This is what this tutorial covers. ## Moving the lastest commits to an existing branch @@ -8,8 +8,8 @@ To do this, type: ```git reset HEAD~ --soft``` - Undoes the last commit, but leave the changes available. ```git stash``` - Records the state of the directory. -```git checkout name-of-the-correct-branch``` - Swiches to another branch. -```git stash pop``` - Removes lastest stashed state. +```git checkout name-of-the-correct-branch``` - Switches to another branch. +```git stash pop``` - Removes latest stashed state. ```git add .``` - Or try adding individual files. ```git commit -m "your message here"``` - Saves and Commits the changes. @@ -19,7 +19,7 @@ Now your changes are on the correct branch ### Moving the lastest commits to a new Branch To do this, type: ```git branch newbranch``` - Creates a new Branch. Saving all the Commits. -```git reset --hard HEAD~#``` - Move master back by # commits. Remember, this commits will be gone from master +```git reset --hard HEAD~#``` - Move master back by # commits. Remember, these commits will be gone from master ```git checkout newbranch``` - Goes to the branch you created. It will have all the commits. -Remember: Any changes not commited will be LOST. +Remember: Any changes not committed will be LOST.