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

Clarify the meaning of remote commands. #26

Closed
wants to merge 3 commits into from
Closed

Conversation

bitdancer
Copy link
Member

You are only ever talking to your local copy of the remote, except for
the new command I added an example of, so I tried to make that clear.

Also fixed a nit with switching branches: you must run make afterward
(at least you do if you expect to test anything). And added a reference to
git worktree...I'm fine if that gets rejected; I haven't used it yet
myself :)

You are only ever talking to your local copy of the remote, except for
the new command I added an example of, so I tried to make that clear.

Also fixed a nit with switching branches: you *must* run make afterward
(at least you do if you expect to test anything).  And added a reference to
git worktree...I'm fine if that gets rejected; I haven't used it yet
myself :)
@@ -243,6 +243,7 @@ Simply use ``git checkout`` to checkout another branch in the current directory:
$ git branch
master
* 3.5
$ make
Copy link
Member

Choose a reason for hiding this comment

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

Why the make command?

Copy link
Member Author

Choose a reason for hiding this comment

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

I mentioned that in the commit message. You can't do any testing unless you run make after switching branches. If you forget the make, weird and mysterious things may happen.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@bitdancer It's likely more user friendly to separate out the make command to a separate paragraph.

Perhaps:

 Simply use ``git checkout`` to checkout another branch in the current directory::

    $ git branch
    * master
      3.5
    $ git checkout 3.5
    Switched to branch '3.5'
    Your branch is up-to-date with 'origin/3.5'.

To verify that your branch has been checked out, enter git branch. After changing branches, it's good practice to run make before executing the tests:

   $ git branch
       master
    * 3.5
   $ make
    $  make

@brettcannon
Copy link
Member

Overall LGTM, just two questions.

@@ -267,6 +268,11 @@ Create several clones of your local repository::
Switched to branch '3.5'
Your branch is up-to-date with 'origin/3.5'.

Alternatively, if you have a new enough version of git an don't mind using
Copy link
Member

Choose a reason for hiding this comment

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

probably a typo: an -> and

``git fetch``. You can find out if your local copy is up to date with
its origin by running::

$ git remote show origin
Copy link
Member

Choose a reason for hiding this comment

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

I think using origin is a bit misleading here. origin will likely be the user's fork so unless they explicitly update their fork this command won't show the actual results. Perhaps we need to add a new FAQ entry about adding a new upstream remote and then use it here?

Copy link
Contributor

Choose a reason for hiding this comment

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

If you do so, please add an information how to sync one's fork with current master as well and how to rebase patches, imho. Both of these are valuable information.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I agree, this should be fixed and rebase should be mentioned. This is turning into a tutorial about using git for cpython development, though. Does it belong in the FAQ or is there somewhere better (and then this faq entry can link to it).

What I do is clone from the original repo, making that origin, and then add my github clone as the remote 'dev'.

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 for the faq entry that can be then linked everywhere where appropriate.

Copy link
Member

Choose a reason for hiding this comment

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

Maybe we consider not keeping the FAQ around anymore and simply do a good tutorial for using git with cpython development? There's tons of docs online on how to use git unlike Mercurial back in the day, so maybe this whole file will lose its usefulness once we switch to GitHub?

Copy link
Member Author

Choose a reason for hiding this comment

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

That's my thought at this point: that a tutorial covering the actions one will want to do with regards to the CPython repo will be the most useful, specifically covering our workflow, including the interaction with the bug tracker. We'll need to fine tune it as we work the latter out.

Copy link
Member

Choose a reason for hiding this comment

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

OK, then let's just delete the FAQ. I created #27 to track the deletion of the FAW and #28 to track creating a tutorial.

Feel free to close this PR, @bitdancer , or if you want to take on the deletion and repurpose this PR then that's obviously fine as well.

@kragniz
Copy link
Contributor

kragniz commented Jul 26, 2016

LGTM, sorry for writing it confusingly in the first place!

@bitdancer
Copy link
Member Author

kragniz: your adaptation of what already existed made sense, but I know from personal experience that the instructions to 'compare to the remote branch' is confusing terminology, at least to someone coming from the old CVS/svn world, since I got very confused by it when first starting out with git.

@willingc
Copy link
Collaborator

@kragniz, I think you did a good job with this PR. Writing about git is never an easy task since people follow different personal workflows. We appreciate the work that you are doing to make the devguide helpful for all. 🍰

@bitdancer
Copy link
Member Author

I'm going to close it. If I do find time to tackle the others, I'll open a new PR. I'm not sure I'm clear on how the workflow will actually work, though, and I'm guessing we won't really be sure until we've done it a few times.

@bitdancer bitdancer closed this Jul 27, 2016
@brettcannon
Copy link
Member

@bitdancer should the branch for this PR be deleted, or did you want to hold on to it?

@bitdancer bitdancer deleted the clarify_remote branch October 6, 2016 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants