Skip to content

Update local main branch during git update #64

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

Merged
merged 2 commits into from
May 26, 2021
Merged

Update local main branch during git update #64

merged 2 commits into from
May 26, 2021

Conversation

f1sherman
Copy link
Contributor

This ensures that the local main branch is updated during git update. Without this it's necessary for the end user to run git update separately on the main branch, and it can be confusing if they e.g. want to diff their newly-updated feature branch against the main branch and don't realize it's stale. This happens to me fairly often and I couldn't think of a reason someone wouldn't want their main branch updated so this seemed like a sane change.

This ensures that the local main branch is updated during `git update`.
Without this it's necessary for the end user to run `git update`
separately on the main branch, and it can be confusing if they e.g. want
to diff their newly-updated feature branch against the main branch and
don't realize it's stale.
@coveralls
Copy link

coveralls commented May 25, 2021

Coverage Status

Coverage increased (+0.005%) to 99.613% when pulling be91d7b on f1sherman:update-local-main-branch-during-git-update into 7ddb2ae on wireframe:main.

@f1sherman f1sherman mentioned this pull request May 25, 2021
@wireframe
Copy link
Owner

I couldn't think of a reason someone wouldn't want their main branch updated so this seemed like a sane change.

+1. This is a common paper cut for me as well. I love this change.

One question...
instead of updating the base branch at the end of the operation, this could be inverted to... (pseudocode)

  • update base branch
  • update feature branch from remote
  • merge local base branch into feature branch

Thoughts?

Per @wireframe's recommendation, update the main branch from remote
before updating the feature branch, and update the feature branch from
local main.
@f1sherman
Copy link
Contributor Author

@wireframe love it! Done in be91d7b.

@wireframe wireframe merged commit 166b77f into wireframe:main May 26, 2021
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