mirror of
https://github.com/k88hudson/git-flight-rules.git
synced 2025-03-10 12:48:43 -03:00
I made changes to the wrong branch (#202)
* I made changes to the wrong branch * Missed from last commit * Fixing links * Making changes * Another change * Moving section
This commit is contained in:
parent
be480c4c35
commit
e0513d81c2
11
README.md
11
README.md
@ -61,6 +61,7 @@ For clarity's sake all examples in this document use a customized bash prompt in
|
||||
- [I want to create a new remote branch from current local one](#i-want-to-create-a-new-remote-branch-from-current-local-one)
|
||||
- [I want to set a remote branch as the upstream for a local branch](#i-want-to-set-a-remote-branch-as-the-upstream-for-a-local-branch)
|
||||
- [I want to set my HEAD to track the default remote branch](#i-want-to-set-my-head-to-track-the-default-remote-branch)
|
||||
- [I made changes on the wrong branch](#i-made-changes-on-the-wrong-branch)
|
||||
- [Rebasing and Merging](#rebasing-and-merging)
|
||||
- [I want to undo rebase/merge](#i-want-to-undo-rebasemerge)
|
||||
- [I rebased, but I don't want to force push](#i-rebased-but-i-dont-want-to-force-push)
|
||||
@ -839,6 +840,16 @@ $ git remote set-head origin --auto
|
||||
origin/HEAD set to master
|
||||
```
|
||||
|
||||
### I made changes on the wrong branch
|
||||
|
||||
You've made uncommitted changes and realise you're on the wrong branch. Stash changes and apply them to the branch you want:
|
||||
|
||||
```sh
|
||||
(wrong_branch)$ git stash
|
||||
(wrong_branch)$ git checkout <correct_branch>
|
||||
(correct_branch)$ git stash apply
|
||||
```
|
||||
|
||||
## Rebasing and Merging
|
||||
|
||||
<a name="undo-rebase"></a>
|
||||
|
Loading…
x
Reference in New Issue
Block a user