question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pip install -e resets to origin/master

See original GitHub issue

If I do this:

pip install -e git://github.com/nimbis/django.git#egg=Django-dev

Then pip will grab the default branch from that repository (1.4.1-patched) and install it, as you can see in the src directory where it’s installed:

cd ~/.virtualenvs/nimbis/src/django
[(1.4.1-patched) ~/.virtualenvs/nimbis/src/django]
$ git log | head -n4
commit a5d7c7b3a2d6a729bf5ede2254b5c75be9da94d7
Author: Lorin Hochstein <...>
Date:   Mon Jul 30 21:44:20 2012 -0400

If I do it again, the HEAD becomes the same as the remote master branch, although it still uses 1.4.1-patched (default branch) as the branch name.

$ pip install -e git://github.com/nimbis/django.git#egg=Django-dev
[(1.4.1-patched) lorin@nibbler ~/.virtualenvs/nimbis/src/django]
$ git log | head -n4
commit e567f439bdfc60e16c465220fdaa8ea8a0fae936
Merge: c0748a6 226a3e7
Author: Alex Gaynor <...>
Date:   Sun Jul 29 17:07:55 2012 -0700

Issue Analytics

  • State:closed
  • Created 11 years ago
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
svetlyak40wtcommented, Mar 26, 2014

I mean, it is still resets to the given branch or revision even if there is uncommited changes. This is very bad behaviour — yesterday I lost few hours of work this way.

0reactions
cumbercommented, Oct 1, 2017

Thanks for clarifying, @cjerdonek. I had misinterpreted this issue as being about the hard reset. I’ll raise a new issue then.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does pip install -e git-repo change HEAD to master when ...
If I do it again, the HEAD becomes the same as the remote master branch, although it still uses 1.4.1-patched (default branch) as...
Read more >
dry_les
a. do the following to install the course python code using pip: cd atsc405 git fetch origin git reset --hard origin/master pip install...
Read more >
git Notes | fastai
Reset branch's HEAD to a given commit hash ... git remote add upstream https://github.com/fastai/fastai1.git ... pip install -e ".[dev]".
Read more >
Do a git reset and push to undo previous local git commits ...
When working locally, it's not exactly clear what happens when you git reset to a previous commit and push those commits to a...
Read more >
Lesson 12: Version control with Git - GitHub Pages
Using Git as a version control system allows communication with remote repositories ... I also selected to add a Python .gitignore , which...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found