El 16/07/2017 a las 15:52, Edward K. Ream escribió:
On Sun, Jul 16, 2017 at 12:29 PM, vitalije <vitali...@gmail.com
<mailto:vitali...@gmail.com>> wrote:
Having said that, my earlier recommendation than one should avoid
switching branches in same folder is not valid any more.
That's great news.
Glad to know this! It's an important step forward.
Anyway, for those of you that need to *continuously work with various
git branches in parallel*, I've recently come across a better way of
doing it: Git Worktrees
<http://blog.mallow-tech.com/2016/01/git-worktree/>. It was introduced
in Git 2.5 and allows you to have various branches of the same
repository simultaneously checked out in separate folders, so you don't
have to do the typical stash-checkout-... workflow when you need to
switch branches with still WIP in the current one...
If you are going to use it, my advice would be to add worktree's folders
*as siblings* of the current working folder.
I mean, doing something like this:
cd leo-editor
git checkout master
git worktree add *../second_branch *second_branch
Here is an example using current Leo branches:
C:\dev\leo-master>*git checkout master*
C:\dev\leo-master>*git worktree add ..\leo-sqlite-leo sqlite-leo*
Preparing ../leo-sqlite-leo (identifier leo-sqlite-leo)
Checking out files: 100% (4873/4873), done.
HEAD is now at 44871a551 Merge branch 'master' of
github.com:leo-editor/leo-editor into sqlite-leo
C:\dev\leo-master>*cd ..\leo-sqlite-leo*
C:\dev\leo-sqlite-leo>*git status*
*On branch sqlite-leo*
Your branch is behind 'origin/sqlite-leo' by 127 commits, and can be
fast-forwarded.
(use "git pull" to update your local branch)
nothing to commit, working tree clean
C:\dev\leo-sqlite-leo>*git pull*
...
Xavier
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.