Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I made changes to the wrong branch #202

Merged
merged 6 commits into from
Jan 7, 2018
Merged

I made changes to the wrong branch #202

merged 6 commits into from
Jan 7, 2018

Conversation

NRKirby
Copy link
Contributor

@NRKirby NRKirby commented Jan 7, 2018

How to apply uncommitted changes to another branch.

Copy link
Collaborator

@RichardLitt RichardLitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good entry! Some changes. This should also be in the Branches section, I think.

README.md Outdated
@@ -427,6 +428,18 @@ When you want to get rid of all of your untracked files
$ git clean -f
```

### I made changes on the wrong branch

You've made uncommitted changes and realise you're on the wrong branch
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a period at the end of the line.

README.md Outdated

You've made uncommitted changes and realise you're on the wrong branch

Stash changes and apply them to the branch you want
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a period, and make this part of the previous paragraph.

README.md Outdated

Stash changes and apply them to the branch you want

```
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be a sh code block.

README.md Outdated
Stash changes and apply them to the branch you want

```
git stash
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the (branch) $ git stash style used elsewhere.

@NRKirby
Copy link
Contributor Author

NRKirby commented Jan 7, 2018

I've made the changes you've asked for, let me know if there's anything else @RichardLitt

README.md Outdated

```sh
(wrong_branch)$ git stash
(wrong_branch)$ git checkout <branch you want to be on>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe change <branch you want to be on> to correct_branch?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@RichardLitt
Copy link
Collaborator

Looks better! Move the section down, too - I think you changed the entry in the TOC, but didn't move the section itself.

@RichardLitt RichardLitt merged commit e0513d8 into k88hudson:master Jan 7, 2018
@RichardLitt
Copy link
Collaborator

Looks good to me! Thank you, @NRKirby!

aroup pushed a commit to aroup/git-flight-rules that referenced this pull request Jan 17, 2020
* I made changes to the wrong branch

* Missed from last commit

* Fixing links

* Making changes

* Another change

* Moving section
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants