Skip to content

Commit d489daf

Browse files
authored
Update README.md
1 parent 8679b77 commit d489daf

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,21 @@
5050
13.) ```git push -f``` (push integrated development changes to your remote feature branch)<br/>
5151

5252
<b>Merge or Rebase your features back into development</b><br/>
53-
14.) ```git checkout development``` (merge the updated code back into development<br/>
54-
15.) ```git merge/rebase feature-branch```<br/>
53+
14.) ```git checkout development```<br/>
54+
15.) ```git merge/rebase feature-branch``` (merge the updated code back into development) <br/>
5555
16.) ```git push```<br/>
5656

5757
14 - 16 can also be done via GitHub via Pull request to review changes before the merge
5858

59+
<b><ins>You have uncommitted changes in a local branch and want to switch to another branch without passing over those changes</ins></b> <br>
60+
Step 1: You are on `branch-A` with uncommitted changes
61+
```git stash``` # Save changes and clean the working directory
62+
```git checkout branch-B``` # Switch to another branch (e.g., branch-B)
63+
64+
Step 2: Work on `branch-B` and then return to `branch-A`
65+
```git checkout branch-A``` # Switch back to the original branch
66+
```git stash apply``` # Restore the stashed changes on `branch-A`
67+
5968

6069
<b><ins>How to Abort the rebase and restore the branch to its original state.</ins></b> <br>
6170
```git rebase --abort``` <br>

0 commit comments

Comments
 (0)