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
Clarify instructions to fetch all upstream branches #1266
Conversation
Clarify that one needs to fetch all branches from upstream website repo, not just master branch
/assign @annajung |
@@ -352,7 +352,7 @@ To merge `master` into `dev-[future release]` on your local fork: | |||
# Step 0 (if you don't already have a remote called "upstream") | |||
git remote add upstream https://github.com/kubernetes/website.git | |||
# Step 1 | |||
git fetch upstream master | |||
git fetch upstream #grab all branches from upstream repo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are pulling the changes from only master
branch to keep dev-[future release]
in sync, I guess fetching just master
branch would suffice here. It avoids fetching all other branches and various changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We actually need to pull both master
and dev-[future release]
, so I don't think we want to pull all branches but add a step to fetch dev-[future release]
.
@savitharaghunathan @kcmartin What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi-- the edit was prompted by an error I got following the steps in the role handbook:
git checkout --track upstream/dev-1.20 fatal: 'upstream/dev-1.20' is not a commit and a branch 'dev-1.20' cannot be created from it
After I used git fetch upstream
, to fetch all the branches, I was able to complete the steps, hence the edit. I'm open to @annajung 's suggestion, or whatever makes sense, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can fetch master
and dev-[future-release]
in just one step?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a great idea. I'm not sure if git fetch
allows multiple branches? We should take a look and see! :)
But, I don't think there's anything wrong with adding an additional command git fetch upstream dev-[future release]
below master
one. Or we can also do git fetch upstream master && git fetch upstream dev-[future release]
to make it one-liner if git fetch doesn't allow multiple branches.
Let's follow up on this and see if we can find anything, else I think adding extra command would be sufficient! 😀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @kcmartin, Thank you for adding the error message, now I remember going through that and had to fetch dev-branch. I used to alternate between fetching everything and just fetching what is required. My apologies for the review comment. I see no harm now in adding an additional step or merging @kcmartin's suggestion.
Per PR discussion we don't really need to fetch all branches
What do you think @annajung and @savitharaghunathan ? |
/lgtm I'll leave approval to @savitharaghunathan |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: annajung, kcmartin, savitharaghunathan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Clarify instructions to state fetch all branches from upstream website repo, not just master branch