Skip to content

Conversation

@thomasballinger
Copy link
Contributor

The current instructions suggest git checkout -b origin/5.x, but this creates a new branch off of the current commit with the confusing name "origin/5.x" instead of creating a local branch with the default upstream of origin/5.x.

Some better options include:

  1. git checkout origin/5.x - prints unnerving error message about detached head, but successfully checkout out 5.x
  2. git checkout -b 5.x origin/5.x - create a new branch off of origin/5.x, tracking origin/5.x - unfortunately confusing to type
  3. git checkout 5.x - for git 1.7.2.3 (2010) and higher (according to second hand source) does the same as command 2.
  4. git checkout --track origin/daves_branch does the same for even older versions of git.

I propose git checkout -b 5.x origin/5.x so as to make no assumptions about git version and to avoid the "detached head" warning that can be unnerving, and to prepare users to later pull to a tracking branch for updates. But we can rely on git version installed being less than 7 years old, git checkout 5.x would be better.

@thomasballinger
Copy link
Contributor Author

#9900 is relevant as that's where this language comes from

@takluyver takluyver added this to the 6.2 milestone Jul 25, 2017
@takluyver
Copy link
Member

Thanks! +1 to the shorter, more modern spelling if you want to update this PR.

The current instructions suggest `git checkout -b origin/5.x`, but this creates
a new branch off of the current commit with the confusing name "origin/5.x"
instead of creating a local branch with the default upstream of origin/5.x.

Some better options include:
1. `git checkout origin/5.x` - prints unnerving error message about detached head, but successfully checkout out 5.x
2. `git checkout -b 5.x origin/5.x` - create a new branch off of origin/5.x, tracking origin/5.x - unfortunately confusing to type
3. `git checkout 5.x` - for git 1.7.2.3 (2010) and higher (according to [second hand source](https://stackoverflow.com/questions/9537392/git-fetch-remote-branch)) does the same as command 2.
4. `git checkout --track origin/5.x` does the same as command 2 for even older versions of git.

This commit uses `git checkout 5.x` since seven years is a long time.
@thomasballinger
Copy link
Contributor Author

Updated to use shorter, more modern spelling.

@takluyver takluyver merged commit 907885b into ipython:master Jul 27, 2017
@takluyver
Copy link
Member

:-)

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.

2 participants