View Single Post
Old 12-19-2019, 08:21 PM   #69
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by jackie_w View Post
Guys, I know you're trying to help and I truly appreciate it, but I'm going to need more detail.

@eschwartz, Switch to it where? In the .bat file which I double-click when I want to run from source? If so, it currently contains 2 lines:
No, you do it right after you clone.

Code:
# download the calibre project
git clone https://github.com/kovidgoyal/calibre

# make sure you're actually using the correct version of the project by
# changing all the files to point to the right development branch
git checkout py3

## profit

# run calibre
calibre.bat

# update calibre by downloading new versions of all source code
# this will also update the files on disk according to your currently
# configured branch
git pull --no-edit
Do not continue to run "git checkout py3". If you do, you'll get a status message:

Already on 'py3'

and nothing will happen. It's a total waste of time.

...

To give you a non-git analogy...

git clone is like downloading a zip file and extracting it into a new folder "myproject", then creating a new folder called "current", which is a directory link to a hidden folder called "myproject/.hidden/available-versions/master". You always access the project using "current", though.
RELEVANT: when you git clone, there is an implied "git checkout master", that is run automatically by git, as part of the cloning process. This is what set your initial version to use.

git pull is like downloading a new copy of the zip file, nuking the "myproject" folder, and re-extracting.
(git checkout is *not* implicitly run here. In the analogy of the "current" link, your link still exists, and does not need changing.)

git checkout py3 is like changing the directory link for "current", to "myproject/.hidden/available-versions/py3", and future git pulls will continue to nuke myproject, update all the .hidden/available-versions/, and leave the "current" directory link intact, still pointing to your preferred version.
eschwartz is offline   Reply With Quote