| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…d on my newbie experience.
There was a problem hiding this comment.
Is this best practice, or should I make a local v1.0.x first and then create the feature branch off of that?
Sorry, something went wrong.
There was a problem hiding this comment.
I don't see any real reason to create an intermediate local branch.
Sorry, something went wrong.
There was a problem hiding this comment.
Either one should be fine. Personally, I have a local v1.0.x branch that I set up to track matplotlib/v1.0.x, not darrendale/v1.0.x. I don't want to worry about keeping my remote darrendale/v1.0.x branch in sync with matplotlib/v1.0.x.
I think the best practice can be stated thus: if the remote has a branch v1.0.x and you make a local copy of it, the state of your local copy should not diverge from the remote. Use "git pull" occasionally to keep it in sync with the remote, and especially when you are about to do a merge. The only time the state of your local copy should diverge from the remote is right before a push, when you do the merge. Right after the push, your local copy and the remote are once again in sync.
By the way, this:
git branch my-new-feature remotes/origin/v1.0.x git checkout my-new-feature
is equivalent to:
git checkout -b my-new-feature remotes/origin/v1.0.x
and it also appears to be equal to:
git checkout -b my-new-feature origin/v1.0.x
One final comment: I find the "origin" and "upstream" convention to be confusing. Instead, I name my remotes after the github profiles: "matplotlib" instead of "upstream", "darrendale" instead of origin. Its a little more concrete.
Sorry, something went wrong.
There was a problem hiding this comment.
After reading Jouni's comment and rereading my own, I think I agree that it is easier to not have an intermediate, local v1.0.x branch.
Sorry, something went wrong.
There was a problem hiding this comment.
I think changing the two commands to "git checkout -b my-new-feature origin/v1.0.x" makes sense.
Sorry, something went wrong.
|
can we add a note about doing how useful git push --dry-run can be, especially in case you're passing the -f flag. In my case, I had pushed some commits to github, but then made changes to the last commit that was pushed out using "git commit --amend", which meant (I think) that I had to do a "git push -f" in order to lose the old (unamended) commit. |
Sorry, something went wrong.
|
Can we add a note never to do git push -f on the upstream repository? You likely did need -f in that case, but your branch was tracking the upstream matplotlib repository and not your own. A possibly safer way to achieve this might have been git push my-repository +my-branch, where the plus means the same as -f. |
Sorry, something went wrong.
There was a problem hiding this comment.
Typo at end of line: you have a semicolon instead of a colon in the next-to-last character.
Sorry, something went wrong.
|
I know this pull request has set here for a while. How does everyone feel about this after incorporating Jouni's improvements etc. Ready to merge? |
Sorry, something went wrong.
|
I wanted to revisit the discussion on integration branches one more time, but I may not get to it for a couple days and don't want to hold up this pull request any longer. If I want to suggest any changes, I can do it in a separate branch. |
Sorry, something went wrong.
|
Sounds good. Just wanted to make sure there wasn't any advice in here that was actively detrimental ;) |
Sorry, something went wrong.
|
some of us are quite capable of being actively detrimental even in the absence of any advice :) |
Sorry, something went wrong.
BUG-FIX: same as changeset 3affca88be30 but in signal branch
Please Welcome Eric Idle to Karma Pi
| Back | FazBrowse Home | New Git URL |
I'm struggling with my early experience with git and these instructions here. I'm trying to clarify these instructions to avoid confusion and future mistakes for others, but I'm not 100% certain these changes are correct.
Additionally, there are some questions in here as comments where I'm not sure how things should be filled in.