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

ensuring correct git branch before "pulling" #8

Closed
wants to merge 1 commit into from

Conversation

nfriedly
Copy link

Rather than performing a git pull, (which merges the desired branch into the current one, even if they aren't the same), this ensures the repo is on the correct branch before merging.

Fixes #7

I went with this variation instead of reset --hard option because it's less likely to surprise anyone by overwriting their local changes.

Rather than performing a git pull, (which merges the desired branch into the current one, even if they aren't the same), this ensures the repo is on the correct branch before merging.
Fixes bevry#7
@balupton
Copy link
Member

balupton commented Sep 6, 2015

I'll take note of this. What are possible side effects that could occur from this change?

@nfriedly
Copy link
Author

I've been using this branch in production for a while and haven't had any issues.

Copy link
Member

@balupton balupton left a comment

Choose a reason for hiding this comment

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

Seems good to me. Difference is that the original way merged changes into the current branch, which I guess may be undesirable. The new change swaps the branch, which I guess is desirable. I don't really know which is more desirable. However considering the reason for this PR, seems the change is. We should explain this reasoning or link to this PR in the comment. Then good to merge.

@balupton
Copy link
Member

Actually a link to this PR in the comment should be the way to go.

balupton added a commit to docpad/docpad-plugin-repocloner that referenced this pull request Apr 16, 2017
- updated base files
- updated dependencies
- wiki clone no longer works, so used new orphan branch
- orphan branch doesn’t work due to
bevry/safeps#8 which has fix
- default repo name to repo url
@balupton balupton closed this in 1b857bc Apr 16, 2017
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.

git pull remote branch causes a merge commit if the branch is different than the current one
2 participants