pip install -e resets to origin/master
See original GitHub issueIf 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:
- Created 11 years ago
- Comments:14 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
Thanks for clarifying, @cjerdonek. I had misinterpreted this issue as being about the hard reset. I’ll raise a new issue then.